diff --git a/crates/bitwarden-api-api/src/models/algorithm.rs b/crates/bitwarden-api-api/src/models/algorithm.rs index 315879d54..2c302de0a 100644 --- a/crates/bitwarden-api-api/src/models/algorithm.rs +++ b/crates/bitwarden-api-api/src/models/algorithm.rs @@ -14,41 +14,41 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum Algorithm { - Variant65535 = -65535, - Variant259 = -259, - Variant258 = -258, - Variant257 = -257, - Variant47 = -47, - Variant39 = -39, - Variant38 = -38, - Variant37 = -37, - Variant36 = -36, - Variant35 = -35, - Variant8 = -8, - Variant7 = -7, + RS1 = -65535, + RS512 = -259, + RS384 = -258, + RS256 = -257, + ES256K = -47, + PS512 = -39, + PS384 = -38, + PS256 = -37, + ES512 = -36, + ES384 = -35, + EdDSA = -8, + ES256 = -7, } impl ToString for Algorithm { fn to_string(&self) -> String { match self { - Self::Variant65535 => String::from("-65535"), - Self::Variant259 => String::from("-259"), - Self::Variant258 => String::from("-258"), - Self::Variant257 => String::from("-257"), - Self::Variant47 => String::from("-47"), - Self::Variant39 => String::from("-39"), - Self::Variant38 => String::from("-38"), - Self::Variant37 => String::from("-37"), - Self::Variant36 => String::from("-36"), - Self::Variant35 => String::from("-35"), - Self::Variant8 => String::from("-8"), - Self::Variant7 => String::from("-7"), + Self::RS1 => String::from("-65535"), + Self::RS512 => String::from("-259"), + Self::RS384 => String::from("-258"), + Self::RS256 => String::from("-257"), + Self::ES256K => String::from("-47"), + Self::PS512 => String::from("-39"), + Self::PS384 => String::from("-38"), + Self::PS256 => String::from("-37"), + Self::ES512 => String::from("-36"), + Self::ES384 => String::from("-35"), + Self::EdDSA => String::from("-8"), + Self::ES256 => String::from("-7"), } } } impl Default for Algorithm { fn default() -> Algorithm { - Self::Variant65535 + Self::RS1 } } diff --git a/crates/bitwarden-api-api/src/models/auth_request_type.rs b/crates/bitwarden-api-api/src/models/auth_request_type.rs index fbcfb8e9f..1ca3f7790 100644 --- a/crates/bitwarden-api-api/src/models/auth_request_type.rs +++ b/crates/bitwarden-api-api/src/models/auth_request_type.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum AuthRequestType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, + AuthenticateAndUnlock = 0, + Unlock = 1, + AdminApproval = 2, } impl ToString for AuthRequestType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::AuthenticateAndUnlock => String::from("0"), + Self::Unlock => String::from("1"), + Self::AdminApproval => String::from("2"), } } } impl Default for AuthRequestType { fn default() -> AuthRequestType { - Self::Variant0 + Self::AuthenticateAndUnlock } } diff --git a/crates/bitwarden-api-api/src/models/cipher_reprompt_type.rs b/crates/bitwarden-api-api/src/models/cipher_reprompt_type.rs index d20cef2db..4443b8c03 100644 --- a/crates/bitwarden-api-api/src/models/cipher_reprompt_type.rs +++ b/crates/bitwarden-api-api/src/models/cipher_reprompt_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum CipherRepromptType { - Variant0 = 0, - Variant1 = 1, + None = 0, + Password = 1, } impl ToString for CipherRepromptType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::None => String::from("0"), + Self::Password => String::from("1"), } } } impl Default for CipherRepromptType { fn default() -> CipherRepromptType { - Self::Variant0 + Self::None } } diff --git a/crates/bitwarden-api-api/src/models/cipher_type.rs b/crates/bitwarden-api-api/src/models/cipher_type.rs index 1420ac6a4..044349ef8 100644 --- a/crates/bitwarden-api-api/src/models/cipher_type.rs +++ b/crates/bitwarden-api-api/src/models/cipher_type.rs @@ -14,25 +14,25 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum CipherType { - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, + Login = 1, + SecureNote = 2, + Card = 3, + Identity = 4, } impl ToString for CipherType { fn to_string(&self) -> String { match self { - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), + Self::Login => String::from("1"), + Self::SecureNote => String::from("2"), + Self::Card => String::from("3"), + Self::Identity => String::from("4"), } } } impl Default for CipherType { fn default() -> CipherType { - Self::Variant1 + Self::Login } } diff --git a/crates/bitwarden-api-api/src/models/device_type.rs b/crates/bitwarden-api-api/src/models/device_type.rs index 26bbc7a52..12e162ce6 100644 --- a/crates/bitwarden-api-api/src/models/device_type.rs +++ b/crates/bitwarden-api-api/src/models/device_type.rs @@ -14,69 +14,69 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum DeviceType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, - Variant9 = 9, - Variant10 = 10, - Variant11 = 11, - Variant12 = 12, - Variant13 = 13, - Variant14 = 14, - Variant15 = 15, - Variant16 = 16, - Variant17 = 17, - Variant18 = 18, - Variant19 = 19, - Variant20 = 20, - Variant21 = 21, - Variant22 = 22, - Variant23 = 23, - Variant24 = 24, - Variant25 = 25, + Android = 0, + iOS = 1, + ChromeExtension = 2, + FirefoxExtension = 3, + OperaExtension = 4, + EdgeExtension = 5, + WindowsDesktop = 6, + MacOsDesktop = 7, + LinuxDesktop = 8, + ChromeBrowser = 9, + FirefoxBrowser = 10, + OperaBrowser = 11, + EdgeBrowser = 12, + IEBrowser = 13, + UnknownBrowser = 14, + AndroidAmazon = 15, + UWP = 16, + SafariBrowser = 17, + VivaldiBrowser = 18, + VivaldiExtension = 19, + SafariExtension = 20, + SDK = 21, + Server = 22, + WindowsCLI = 23, + MacOsCLI = 24, + LinuxCLI = 25, } impl ToString for DeviceType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), - Self::Variant9 => String::from("9"), - Self::Variant10 => String::from("10"), - Self::Variant11 => String::from("11"), - Self::Variant12 => String::from("12"), - Self::Variant13 => String::from("13"), - Self::Variant14 => String::from("14"), - Self::Variant15 => String::from("15"), - Self::Variant16 => String::from("16"), - Self::Variant17 => String::from("17"), - Self::Variant18 => String::from("18"), - Self::Variant19 => String::from("19"), - Self::Variant20 => String::from("20"), - Self::Variant21 => String::from("21"), - Self::Variant22 => String::from("22"), - Self::Variant23 => String::from("23"), - Self::Variant24 => String::from("24"), - Self::Variant25 => String::from("25"), + Self::Android => String::from("0"), + Self::iOS => String::from("1"), + Self::ChromeExtension => String::from("2"), + Self::FirefoxExtension => String::from("3"), + Self::OperaExtension => String::from("4"), + Self::EdgeExtension => String::from("5"), + Self::WindowsDesktop => String::from("6"), + Self::MacOsDesktop => String::from("7"), + Self::LinuxDesktop => String::from("8"), + Self::ChromeBrowser => String::from("9"), + Self::FirefoxBrowser => String::from("10"), + Self::OperaBrowser => String::from("11"), + Self::EdgeBrowser => String::from("12"), + Self::IEBrowser => String::from("13"), + Self::UnknownBrowser => String::from("14"), + Self::AndroidAmazon => String::from("15"), + Self::UWP => String::from("16"), + Self::SafariBrowser => String::from("17"), + Self::VivaldiBrowser => String::from("18"), + Self::VivaldiExtension => String::from("19"), + Self::SafariExtension => String::from("20"), + Self::SDK => String::from("21"), + Self::Server => String::from("22"), + Self::WindowsCLI => String::from("23"), + Self::MacOsCLI => String::from("24"), + Self::LinuxCLI => String::from("25"), } } } impl Default for DeviceType { fn default() -> DeviceType { - Self::Variant0 + Self::Android } } diff --git a/crates/bitwarden-api-api/src/models/emergency_access_status_type.rs b/crates/bitwarden-api-api/src/models/emergency_access_status_type.rs index a4766cec4..9b046f3eb 100644 --- a/crates/bitwarden-api-api/src/models/emergency_access_status_type.rs +++ b/crates/bitwarden-api-api/src/models/emergency_access_status_type.rs @@ -14,27 +14,27 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum EmergencyAccessStatusType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, + Invited = 0, + Accepted = 1, + Confirmed = 2, + RecoveryInitiated = 3, + RecoveryApproved = 4, } impl ToString for EmergencyAccessStatusType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), + Self::Invited => String::from("0"), + Self::Accepted => String::from("1"), + Self::Confirmed => String::from("2"), + Self::RecoveryInitiated => String::from("3"), + Self::RecoveryApproved => String::from("4"), } } } impl Default for EmergencyAccessStatusType { fn default() -> EmergencyAccessStatusType { - Self::Variant0 + Self::Invited } } diff --git a/crates/bitwarden-api-api/src/models/emergency_access_type.rs b/crates/bitwarden-api-api/src/models/emergency_access_type.rs index 007df25a2..317c42f94 100644 --- a/crates/bitwarden-api-api/src/models/emergency_access_type.rs +++ b/crates/bitwarden-api-api/src/models/emergency_access_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum EmergencyAccessType { - Variant0 = 0, - Variant1 = 1, + View = 0, + Takeover = 1, } impl ToString for EmergencyAccessType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::View => String::from("0"), + Self::Takeover => String::from("1"), } } } impl Default for EmergencyAccessType { fn default() -> EmergencyAccessType { - Self::Variant0 + Self::View } } diff --git a/crates/bitwarden-api-api/src/models/event_system_user.rs b/crates/bitwarden-api-api/src/models/event_system_user.rs index 8a1795433..afb1333e8 100644 --- a/crates/bitwarden-api-api/src/models/event_system_user.rs +++ b/crates/bitwarden-api-api/src/models/event_system_user.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum EventSystemUser { - Variant1 = 1, - Variant2 = 2, + SCIM = 1, + DomainVerification = 2, } impl ToString for EventSystemUser { fn to_string(&self) -> String { match self { - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::SCIM => String::from("1"), + Self::DomainVerification => String::from("2"), } } } impl Default for EventSystemUser { fn default() -> EventSystemUser { - Self::Variant1 + Self::SCIM } } diff --git a/crates/bitwarden-api-api/src/models/event_type.rs b/crates/bitwarden-api-api/src/models/event_type.rs index cc4e96c14..2826c1fb4 100644 --- a/crates/bitwarden-api-api/src/models/event_type.rs +++ b/crates/bitwarden-api-api/src/models/event_type.rs @@ -14,165 +14,165 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum EventType { - Variant1000 = 1000, - Variant1001 = 1001, - Variant1002 = 1002, - Variant1003 = 1003, - Variant1004 = 1004, - Variant1005 = 1005, - Variant1006 = 1006, - Variant1007 = 1007, - Variant1008 = 1008, - Variant1009 = 1009, - Variant1010 = 1010, - Variant1100 = 1100, - Variant1101 = 1101, - Variant1102 = 1102, - Variant1103 = 1103, - Variant1104 = 1104, - Variant1105 = 1105, - Variant1106 = 1106, - Variant1107 = 1107, - Variant1108 = 1108, - Variant1109 = 1109, - Variant1110 = 1110, - Variant1111 = 1111, - Variant1112 = 1112, - Variant1113 = 1113, - Variant1114 = 1114, - Variant1115 = 1115, - Variant1116 = 1116, - Variant1117 = 1117, - Variant1300 = 1300, - Variant1301 = 1301, - Variant1302 = 1302, - Variant1400 = 1400, - Variant1401 = 1401, - Variant1402 = 1402, - Variant1500 = 1500, - Variant1501 = 1501, - Variant1502 = 1502, - Variant1503 = 1503, - Variant1504 = 1504, - Variant1505 = 1505, - Variant1506 = 1506, - Variant1507 = 1507, - Variant1508 = 1508, - Variant1509 = 1509, - Variant1510 = 1510, - Variant1511 = 1511, - Variant1512 = 1512, - Variant1513 = 1513, - Variant1514 = 1514, - Variant1600 = 1600, - Variant1601 = 1601, - Variant1602 = 1602, - Variant1603 = 1603, - Variant1604 = 1604, - Variant1605 = 1605, - Variant1606 = 1606, - Variant1607 = 1607, - Variant1608 = 1608, - Variant1609 = 1609, - Variant1700 = 1700, - Variant1800 = 1800, - Variant1801 = 1801, - Variant1802 = 1802, - Variant1803 = 1803, - Variant1900 = 1900, - Variant1901 = 1901, - Variant1902 = 1902, - Variant1903 = 1903, - Variant2000 = 2000, - Variant2001 = 2001, - Variant2002 = 2002, - Variant2003 = 2003, - Variant2100 = 2100, + User_LoggedIn = 1000, + User_ChangedPassword = 1001, + User_Updated2fa = 1002, + User_Disabled2fa = 1003, + User_Recovered2fa = 1004, + User_FailedLogIn = 1005, + User_FailedLogIn2fa = 1006, + User_ClientExportedVault = 1007, + User_UpdatedTempPassword = 1008, + User_MigratedKeyToKeyConnector = 1009, + User_RequestedDeviceApproval = 1010, + Cipher_Created = 1100, + Cipher_Updated = 1101, + Cipher_Deleted = 1102, + Cipher_AttachmentCreated = 1103, + Cipher_AttachmentDeleted = 1104, + Cipher_Shared = 1105, + Cipher_UpdatedCollections = 1106, + Cipher_ClientViewed = 1107, + Cipher_ClientToggledPasswordVisible = 1108, + Cipher_ClientToggledHiddenFieldVisible = 1109, + Cipher_ClientToggledCardCodeVisible = 1110, + Cipher_ClientCopiedPassword = 1111, + Cipher_ClientCopiedHiddenField = 1112, + Cipher_ClientCopiedCardCode = 1113, + Cipher_ClientAutofilled = 1114, + Cipher_SoftDeleted = 1115, + Cipher_Restored = 1116, + Cipher_ClientToggledCardNumberVisible = 1117, + Collection_Created = 1300, + Collection_Updated = 1301, + Collection_Deleted = 1302, + Group_Created = 1400, + Group_Updated = 1401, + Group_Deleted = 1402, + OrganizationUser_Invited = 1500, + OrganizationUser_Confirmed = 1501, + OrganizationUser_Updated = 1502, + OrganizationUser_Removed = 1503, + OrganizationUser_UpdatedGroups = 1504, + OrganizationUser_UnlinkedSso = 1505, + OrganizationUser_ResetPassword_Enroll = 1506, + OrganizationUser_ResetPassword_Withdraw = 1507, + OrganizationUser_AdminResetPassword = 1508, + OrganizationUser_ResetSsoLink = 1509, + OrganizationUser_FirstSsoLogin = 1510, + OrganizationUser_Revoked = 1511, + OrganizationUser_Restored = 1512, + OrganizationUser_ApprovedAuthRequest = 1513, + OrganizationUser_RejectedAuthRequest = 1514, + Organization_Updated = 1600, + Organization_PurgedVault = 1601, + Organization_ClientExportedVault = 1602, + Organization_VaultAccessed = 1603, + Organization_EnabledSso = 1604, + Organization_DisabledSso = 1605, + Organization_EnabledKeyConnector = 1606, + Organization_DisabledKeyConnector = 1607, + Organization_SponsorshipsSynced = 1608, + Organization_CollectionManagement_Updated = 1609, + Policy_Updated = 1700, + ProviderUser_Invited = 1800, + ProviderUser_Confirmed = 1801, + ProviderUser_Updated = 1802, + ProviderUser_Removed = 1803, + ProviderOrganization_Created = 1900, + ProviderOrganization_Added = 1901, + ProviderOrganization_Removed = 1902, + ProviderOrganization_VaultAccessed = 1903, + OrganizationDomain_Added = 2000, + OrganizationDomain_Removed = 2001, + OrganizationDomain_Verified = 2002, + OrganizationDomain_NotVerified = 2003, + Secret_Retrieved = 2100, } impl ToString for EventType { fn to_string(&self) -> String { match self { - Self::Variant1000 => String::from("1000"), - Self::Variant1001 => String::from("1001"), - Self::Variant1002 => String::from("1002"), - Self::Variant1003 => String::from("1003"), - Self::Variant1004 => String::from("1004"), - Self::Variant1005 => String::from("1005"), - Self::Variant1006 => String::from("1006"), - Self::Variant1007 => String::from("1007"), - Self::Variant1008 => String::from("1008"), - Self::Variant1009 => String::from("1009"), - Self::Variant1010 => String::from("1010"), - Self::Variant1100 => String::from("1100"), - Self::Variant1101 => String::from("1101"), - Self::Variant1102 => String::from("1102"), - Self::Variant1103 => String::from("1103"), - Self::Variant1104 => String::from("1104"), - Self::Variant1105 => String::from("1105"), - Self::Variant1106 => String::from("1106"), - Self::Variant1107 => String::from("1107"), - Self::Variant1108 => String::from("1108"), - Self::Variant1109 => String::from("1109"), - Self::Variant1110 => String::from("1110"), - Self::Variant1111 => String::from("1111"), - Self::Variant1112 => String::from("1112"), - Self::Variant1113 => String::from("1113"), - Self::Variant1114 => String::from("1114"), - Self::Variant1115 => String::from("1115"), - Self::Variant1116 => String::from("1116"), - Self::Variant1117 => String::from("1117"), - Self::Variant1300 => String::from("1300"), - Self::Variant1301 => String::from("1301"), - Self::Variant1302 => String::from("1302"), - Self::Variant1400 => String::from("1400"), - Self::Variant1401 => String::from("1401"), - Self::Variant1402 => String::from("1402"), - Self::Variant1500 => String::from("1500"), - Self::Variant1501 => String::from("1501"), - Self::Variant1502 => String::from("1502"), - Self::Variant1503 => String::from("1503"), - Self::Variant1504 => String::from("1504"), - Self::Variant1505 => String::from("1505"), - Self::Variant1506 => String::from("1506"), - Self::Variant1507 => String::from("1507"), - Self::Variant1508 => String::from("1508"), - Self::Variant1509 => String::from("1509"), - Self::Variant1510 => String::from("1510"), - Self::Variant1511 => String::from("1511"), - Self::Variant1512 => String::from("1512"), - Self::Variant1513 => String::from("1513"), - Self::Variant1514 => String::from("1514"), - Self::Variant1600 => String::from("1600"), - Self::Variant1601 => String::from("1601"), - Self::Variant1602 => String::from("1602"), - Self::Variant1603 => String::from("1603"), - Self::Variant1604 => String::from("1604"), - Self::Variant1605 => String::from("1605"), - Self::Variant1606 => String::from("1606"), - Self::Variant1607 => String::from("1607"), - Self::Variant1608 => String::from("1608"), - Self::Variant1609 => String::from("1609"), - Self::Variant1700 => String::from("1700"), - Self::Variant1800 => String::from("1800"), - Self::Variant1801 => String::from("1801"), - Self::Variant1802 => String::from("1802"), - Self::Variant1803 => String::from("1803"), - Self::Variant1900 => String::from("1900"), - Self::Variant1901 => String::from("1901"), - Self::Variant1902 => String::from("1902"), - Self::Variant1903 => String::from("1903"), - Self::Variant2000 => String::from("2000"), - Self::Variant2001 => String::from("2001"), - Self::Variant2002 => String::from("2002"), - Self::Variant2003 => String::from("2003"), - Self::Variant2100 => String::from("2100"), + Self::User_LoggedIn => String::from("1000"), + Self::User_ChangedPassword => String::from("1001"), + Self::User_Updated2fa => String::from("1002"), + Self::User_Disabled2fa => String::from("1003"), + Self::User_Recovered2fa => String::from("1004"), + Self::User_FailedLogIn => String::from("1005"), + Self::User_FailedLogIn2fa => String::from("1006"), + Self::User_ClientExportedVault => String::from("1007"), + Self::User_UpdatedTempPassword => String::from("1008"), + Self::User_MigratedKeyToKeyConnector => String::from("1009"), + Self::User_RequestedDeviceApproval => String::from("1010"), + Self::Cipher_Created => String::from("1100"), + Self::Cipher_Updated => String::from("1101"), + Self::Cipher_Deleted => String::from("1102"), + Self::Cipher_AttachmentCreated => String::from("1103"), + Self::Cipher_AttachmentDeleted => String::from("1104"), + Self::Cipher_Shared => String::from("1105"), + Self::Cipher_UpdatedCollections => String::from("1106"), + Self::Cipher_ClientViewed => String::from("1107"), + Self::Cipher_ClientToggledPasswordVisible => String::from("1108"), + Self::Cipher_ClientToggledHiddenFieldVisible => String::from("1109"), + Self::Cipher_ClientToggledCardCodeVisible => String::from("1110"), + Self::Cipher_ClientCopiedPassword => String::from("1111"), + Self::Cipher_ClientCopiedHiddenField => String::from("1112"), + Self::Cipher_ClientCopiedCardCode => String::from("1113"), + Self::Cipher_ClientAutofilled => String::from("1114"), + Self::Cipher_SoftDeleted => String::from("1115"), + Self::Cipher_Restored => String::from("1116"), + Self::Cipher_ClientToggledCardNumberVisible => String::from("1117"), + Self::Collection_Created => String::from("1300"), + Self::Collection_Updated => String::from("1301"), + Self::Collection_Deleted => String::from("1302"), + Self::Group_Created => String::from("1400"), + Self::Group_Updated => String::from("1401"), + Self::Group_Deleted => String::from("1402"), + Self::OrganizationUser_Invited => String::from("1500"), + Self::OrganizationUser_Confirmed => String::from("1501"), + Self::OrganizationUser_Updated => String::from("1502"), + Self::OrganizationUser_Removed => String::from("1503"), + Self::OrganizationUser_UpdatedGroups => String::from("1504"), + Self::OrganizationUser_UnlinkedSso => String::from("1505"), + Self::OrganizationUser_ResetPassword_Enroll => String::from("1506"), + Self::OrganizationUser_ResetPassword_Withdraw => String::from("1507"), + Self::OrganizationUser_AdminResetPassword => String::from("1508"), + Self::OrganizationUser_ResetSsoLink => String::from("1509"), + Self::OrganizationUser_FirstSsoLogin => String::from("1510"), + Self::OrganizationUser_Revoked => String::from("1511"), + Self::OrganizationUser_Restored => String::from("1512"), + Self::OrganizationUser_ApprovedAuthRequest => String::from("1513"), + Self::OrganizationUser_RejectedAuthRequest => String::from("1514"), + Self::Organization_Updated => String::from("1600"), + Self::Organization_PurgedVault => String::from("1601"), + Self::Organization_ClientExportedVault => String::from("1602"), + Self::Organization_VaultAccessed => String::from("1603"), + Self::Organization_EnabledSso => String::from("1604"), + Self::Organization_DisabledSso => String::from("1605"), + Self::Organization_EnabledKeyConnector => String::from("1606"), + Self::Organization_DisabledKeyConnector => String::from("1607"), + Self::Organization_SponsorshipsSynced => String::from("1608"), + Self::Organization_CollectionManagement_Updated => String::from("1609"), + Self::Policy_Updated => String::from("1700"), + Self::ProviderUser_Invited => String::from("1800"), + Self::ProviderUser_Confirmed => String::from("1801"), + Self::ProviderUser_Updated => String::from("1802"), + Self::ProviderUser_Removed => String::from("1803"), + Self::ProviderOrganization_Created => String::from("1900"), + Self::ProviderOrganization_Added => String::from("1901"), + Self::ProviderOrganization_Removed => String::from("1902"), + Self::ProviderOrganization_VaultAccessed => String::from("1903"), + Self::OrganizationDomain_Added => String::from("2000"), + Self::OrganizationDomain_Removed => String::from("2001"), + Self::OrganizationDomain_Verified => String::from("2002"), + Self::OrganizationDomain_NotVerified => String::from("2003"), + Self::Secret_Retrieved => String::from("2100"), } } } impl Default for EventType { fn default() -> EventType { - Self::Variant1000 + Self::User_LoggedIn } } diff --git a/crates/bitwarden-api-api/src/models/field_type.rs b/crates/bitwarden-api-api/src/models/field_type.rs index fbaa9b728..3a6209399 100644 --- a/crates/bitwarden-api-api/src/models/field_type.rs +++ b/crates/bitwarden-api-api/src/models/field_type.rs @@ -14,25 +14,25 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum FieldType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, + Text = 0, + Hidden = 1, + Boolean = 2, + Linked = 3, } impl ToString for FieldType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), + Self::Text => String::from("0"), + Self::Hidden => String::from("1"), + Self::Boolean => String::from("2"), + Self::Linked => String::from("3"), } } } impl Default for FieldType { fn default() -> FieldType { - Self::Variant0 + Self::Text } } diff --git a/crates/bitwarden-api-api/src/models/file_upload_type.rs b/crates/bitwarden-api-api/src/models/file_upload_type.rs index 765bc7563..79327b3cb 100644 --- a/crates/bitwarden-api-api/src/models/file_upload_type.rs +++ b/crates/bitwarden-api-api/src/models/file_upload_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum FileUploadType { - Variant0 = 0, - Variant1 = 1, + Direct = 0, + Azure = 1, } impl ToString for FileUploadType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::Direct => String::from("0"), + Self::Azure => String::from("1"), } } } impl Default for FileUploadType { fn default() -> FileUploadType { - Self::Variant0 + Self::Direct } } diff --git a/crates/bitwarden-api-api/src/models/global_equivalent_domains_type.rs b/crates/bitwarden-api-api/src/models/global_equivalent_domains_type.rs index f5e1c3655..f30b2d5e7 100644 --- a/crates/bitwarden-api-api/src/models/global_equivalent_domains_type.rs +++ b/crates/bitwarden-api-api/src/models/global_equivalent_domains_type.rs @@ -14,199 +14,199 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum GlobalEquivalentDomainsType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, - Variant9 = 9, - Variant10 = 10, - Variant11 = 11, - Variant12 = 12, - Variant13 = 13, - Variant14 = 14, - Variant15 = 15, - Variant16 = 16, - Variant17 = 17, - Variant18 = 18, - Variant19 = 19, - Variant20 = 20, - Variant21 = 21, - Variant22 = 22, - Variant23 = 23, - Variant24 = 24, - Variant25 = 25, - Variant26 = 26, - Variant27 = 27, - Variant28 = 28, - Variant29 = 29, - Variant30 = 30, - Variant31 = 31, - Variant32 = 32, - Variant33 = 33, - Variant34 = 34, - Variant35 = 35, - Variant36 = 36, - Variant37 = 37, - Variant38 = 38, - Variant39 = 39, - Variant40 = 40, - Variant41 = 41, - Variant42 = 42, - Variant43 = 43, - Variant44 = 44, - Variant45 = 45, - Variant46 = 46, - Variant47 = 47, - Variant48 = 48, - Variant49 = 49, - Variant50 = 50, - Variant51 = 51, - Variant52 = 52, - Variant53 = 53, - Variant54 = 54, - Variant55 = 55, - Variant56 = 56, - Variant57 = 57, - Variant58 = 58, - Variant59 = 59, - Variant60 = 60, - Variant61 = 61, - Variant62 = 62, - Variant63 = 63, - Variant64 = 64, - Variant65 = 65, - Variant66 = 66, - Variant67 = 67, - Variant68 = 68, - Variant69 = 69, - Variant70 = 70, - Variant71 = 71, - Variant72 = 72, - Variant73 = 73, - Variant74 = 74, - Variant75 = 75, - Variant76 = 76, - Variant77 = 77, - Variant78 = 78, - Variant79 = 79, - Variant80 = 80, - Variant81 = 81, - Variant82 = 82, - Variant83 = 83, - Variant84 = 84, - Variant85 = 85, - Variant86 = 86, - Variant87 = 87, - Variant88 = 88, - Variant89 = 89, - Variant90 = 90, + Google = 0, + Apple = 1, + Ameritrade = 2, + BoA = 3, + Sprint = 4, + WellsFargo = 5, + Merrill = 6, + Citi = 7, + Cnet = 8, + Gap = 9, + Microsoft = 10, + United = 11, + Yahoo = 12, + Zonelabs = 13, + PayPal = 14, + Avon = 15, + Diapers = 16, + Contacts = 17, + Amazon = 18, + Cox = 19, + Norton = 20, + Verizon = 21, + Buy = 22, + Sirius = 23, + Ea = 24, + Basecamp = 25, + Steam = 26, + Chart = 27, + Gotomeeting = 28, + Gogo = 29, + Oracle = 30, + Discover = 31, + Dcu = 32, + Healthcare = 33, + Pepco = 34, + Century21 = 35, + Comcast = 36, + Cricket = 37, + Mtb = 38, + Dropbox = 39, + Snapfish = 40, + Alibaba = 41, + Playstation = 42, + Mercado = 43, + Zendesk = 44, + Autodesk = 45, + RailNation = 46, + Wpcu = 47, + Mathletics = 48, + Discountbank = 49, + Mi = 50, + Facebook = 51, + Postepay = 52, + Skysports = 53, + Disney = 54, + Pokemon = 55, + Uv = 56, + Yahavo = 57, + Mdsol = 58, + Sears = 59, + Xiami = 60, + Belkin = 61, + Turbotax = 62, + Shopify = 63, + Ebay = 64, + Techdata = 65, + Schwab = 66, + Mozilla = 67, + Tesla = 68, + MorganStanley = 69, + TaxAct = 70, + Wikimedia = 71, + Airbnb = 72, + Eventbrite = 73, + StackExchange = 74, + Docusign = 75, + Envato = 76, + X10Hosting = 77, + Cisco = 78, + CedarFair = 79, + Ubiquiti = 80, + Discord = 81, + Netcup = 82, + Yandex = 83, + Sony = 84, + Proton = 85, + Ubisoft = 86, + TransferWise = 87, + TakeawayEU = 88, + Atlassian = 89, + Pinterest = 90, } impl ToString for GlobalEquivalentDomainsType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), - Self::Variant9 => String::from("9"), - Self::Variant10 => String::from("10"), - Self::Variant11 => String::from("11"), - Self::Variant12 => String::from("12"), - Self::Variant13 => String::from("13"), - Self::Variant14 => String::from("14"), - Self::Variant15 => String::from("15"), - Self::Variant16 => String::from("16"), - Self::Variant17 => String::from("17"), - Self::Variant18 => String::from("18"), - Self::Variant19 => String::from("19"), - Self::Variant20 => String::from("20"), - Self::Variant21 => String::from("21"), - Self::Variant22 => String::from("22"), - Self::Variant23 => String::from("23"), - Self::Variant24 => String::from("24"), - Self::Variant25 => String::from("25"), - Self::Variant26 => String::from("26"), - Self::Variant27 => String::from("27"), - Self::Variant28 => String::from("28"), - Self::Variant29 => String::from("29"), - Self::Variant30 => String::from("30"), - Self::Variant31 => String::from("31"), - Self::Variant32 => String::from("32"), - Self::Variant33 => String::from("33"), - Self::Variant34 => String::from("34"), - Self::Variant35 => String::from("35"), - Self::Variant36 => String::from("36"), - Self::Variant37 => String::from("37"), - Self::Variant38 => String::from("38"), - Self::Variant39 => String::from("39"), - Self::Variant40 => String::from("40"), - Self::Variant41 => String::from("41"), - Self::Variant42 => String::from("42"), - Self::Variant43 => String::from("43"), - Self::Variant44 => String::from("44"), - Self::Variant45 => String::from("45"), - Self::Variant46 => String::from("46"), - Self::Variant47 => String::from("47"), - Self::Variant48 => String::from("48"), - Self::Variant49 => String::from("49"), - Self::Variant50 => String::from("50"), - Self::Variant51 => String::from("51"), - Self::Variant52 => String::from("52"), - Self::Variant53 => String::from("53"), - Self::Variant54 => String::from("54"), - Self::Variant55 => String::from("55"), - Self::Variant56 => String::from("56"), - Self::Variant57 => String::from("57"), - Self::Variant58 => String::from("58"), - Self::Variant59 => String::from("59"), - Self::Variant60 => String::from("60"), - Self::Variant61 => String::from("61"), - Self::Variant62 => String::from("62"), - Self::Variant63 => String::from("63"), - Self::Variant64 => String::from("64"), - Self::Variant65 => String::from("65"), - Self::Variant66 => String::from("66"), - Self::Variant67 => String::from("67"), - Self::Variant68 => String::from("68"), - Self::Variant69 => String::from("69"), - Self::Variant70 => String::from("70"), - Self::Variant71 => String::from("71"), - Self::Variant72 => String::from("72"), - Self::Variant73 => String::from("73"), - Self::Variant74 => String::from("74"), - Self::Variant75 => String::from("75"), - Self::Variant76 => String::from("76"), - Self::Variant77 => String::from("77"), - Self::Variant78 => String::from("78"), - Self::Variant79 => String::from("79"), - Self::Variant80 => String::from("80"), - Self::Variant81 => String::from("81"), - Self::Variant82 => String::from("82"), - Self::Variant83 => String::from("83"), - Self::Variant84 => String::from("84"), - Self::Variant85 => String::from("85"), - Self::Variant86 => String::from("86"), - Self::Variant87 => String::from("87"), - Self::Variant88 => String::from("88"), - Self::Variant89 => String::from("89"), - Self::Variant90 => String::from("90"), + Self::Google => String::from("0"), + Self::Apple => String::from("1"), + Self::Ameritrade => String::from("2"), + Self::BoA => String::from("3"), + Self::Sprint => String::from("4"), + Self::WellsFargo => String::from("5"), + Self::Merrill => String::from("6"), + Self::Citi => String::from("7"), + Self::Cnet => String::from("8"), + Self::Gap => String::from("9"), + Self::Microsoft => String::from("10"), + Self::United => String::from("11"), + Self::Yahoo => String::from("12"), + Self::Zonelabs => String::from("13"), + Self::PayPal => String::from("14"), + Self::Avon => String::from("15"), + Self::Diapers => String::from("16"), + Self::Contacts => String::from("17"), + Self::Amazon => String::from("18"), + Self::Cox => String::from("19"), + Self::Norton => String::from("20"), + Self::Verizon => String::from("21"), + Self::Buy => String::from("22"), + Self::Sirius => String::from("23"), + Self::Ea => String::from("24"), + Self::Basecamp => String::from("25"), + Self::Steam => String::from("26"), + Self::Chart => String::from("27"), + Self::Gotomeeting => String::from("28"), + Self::Gogo => String::from("29"), + Self::Oracle => String::from("30"), + Self::Discover => String::from("31"), + Self::Dcu => String::from("32"), + Self::Healthcare => String::from("33"), + Self::Pepco => String::from("34"), + Self::Century21 => String::from("35"), + Self::Comcast => String::from("36"), + Self::Cricket => String::from("37"), + Self::Mtb => String::from("38"), + Self::Dropbox => String::from("39"), + Self::Snapfish => String::from("40"), + Self::Alibaba => String::from("41"), + Self::Playstation => String::from("42"), + Self::Mercado => String::from("43"), + Self::Zendesk => String::from("44"), + Self::Autodesk => String::from("45"), + Self::RailNation => String::from("46"), + Self::Wpcu => String::from("47"), + Self::Mathletics => String::from("48"), + Self::Discountbank => String::from("49"), + Self::Mi => String::from("50"), + Self::Facebook => String::from("51"), + Self::Postepay => String::from("52"), + Self::Skysports => String::from("53"), + Self::Disney => String::from("54"), + Self::Pokemon => String::from("55"), + Self::Uv => String::from("56"), + Self::Yahavo => String::from("57"), + Self::Mdsol => String::from("58"), + Self::Sears => String::from("59"), + Self::Xiami => String::from("60"), + Self::Belkin => String::from("61"), + Self::Turbotax => String::from("62"), + Self::Shopify => String::from("63"), + Self::Ebay => String::from("64"), + Self::Techdata => String::from("65"), + Self::Schwab => String::from("66"), + Self::Mozilla => String::from("67"), + Self::Tesla => String::from("68"), + Self::MorganStanley => String::from("69"), + Self::TaxAct => String::from("70"), + Self::Wikimedia => String::from("71"), + Self::Airbnb => String::from("72"), + Self::Eventbrite => String::from("73"), + Self::StackExchange => String::from("74"), + Self::Docusign => String::from("75"), + Self::Envato => String::from("76"), + Self::X10Hosting => String::from("77"), + Self::Cisco => String::from("78"), + Self::CedarFair => String::from("79"), + Self::Ubiquiti => String::from("80"), + Self::Discord => String::from("81"), + Self::Netcup => String::from("82"), + Self::Yandex => String::from("83"), + Self::Sony => String::from("84"), + Self::Proton => String::from("85"), + Self::Ubisoft => String::from("86"), + Self::TransferWise => String::from("87"), + Self::TakeawayEU => String::from("88"), + Self::Atlassian => String::from("89"), + Self::Pinterest => String::from("90"), } } } impl Default for GlobalEquivalentDomainsType { fn default() -> GlobalEquivalentDomainsType { - Self::Variant0 + Self::Google } } diff --git a/crates/bitwarden-api-api/src/models/kdf_type.rs b/crates/bitwarden-api-api/src/models/kdf_type.rs index 83b611680..e371ee156 100644 --- a/crates/bitwarden-api-api/src/models/kdf_type.rs +++ b/crates/bitwarden-api-api/src/models/kdf_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum KdfType { - Variant0 = 0, - Variant1 = 1, + PBKDF2_SHA256 = 0, + Argon2id = 1, } impl ToString for KdfType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::PBKDF2_SHA256 => String::from("0"), + Self::Argon2id => String::from("1"), } } } impl Default for KdfType { fn default() -> KdfType { - Self::Variant0 + Self::PBKDF2_SHA256 } } diff --git a/crates/bitwarden-api-api/src/models/license_type.rs b/crates/bitwarden-api-api/src/models/license_type.rs index 0f887fa79..178b3433f 100644 --- a/crates/bitwarden-api-api/src/models/license_type.rs +++ b/crates/bitwarden-api-api/src/models/license_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum LicenseType { - Variant0 = 0, - Variant1 = 1, + User = 0, + Organization = 1, } impl ToString for LicenseType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::User => String::from("0"), + Self::Organization => String::from("1"), } } } impl Default for LicenseType { fn default() -> LicenseType { - Self::Variant0 + Self::User } } diff --git a/crates/bitwarden-api-api/src/models/member_decryption_type.rs b/crates/bitwarden-api-api/src/models/member_decryption_type.rs index e36344a9f..dba1b793b 100644 --- a/crates/bitwarden-api-api/src/models/member_decryption_type.rs +++ b/crates/bitwarden-api-api/src/models/member_decryption_type.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum MemberDecryptionType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, + MasterPassword = 0, + KeyConnector = 1, + TrustedDeviceEncryption = 2, } impl ToString for MemberDecryptionType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::MasterPassword => String::from("0"), + Self::KeyConnector => String::from("1"), + Self::TrustedDeviceEncryption => String::from("2"), } } } impl Default for MemberDecryptionType { fn default() -> MemberDecryptionType { - Self::Variant0 + Self::MasterPassword } } diff --git a/crates/bitwarden-api-api/src/models/open_id_connect_redirect_behavior.rs b/crates/bitwarden-api-api/src/models/open_id_connect_redirect_behavior.rs index 73fb93eb8..792a2dd9e 100644 --- a/crates/bitwarden-api-api/src/models/open_id_connect_redirect_behavior.rs +++ b/crates/bitwarden-api-api/src/models/open_id_connect_redirect_behavior.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum OpenIdConnectRedirectBehavior { - Variant0 = 0, - Variant1 = 1, + RedirectGet = 0, + FormPost = 1, } impl ToString for OpenIdConnectRedirectBehavior { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::RedirectGet => String::from("0"), + Self::FormPost => String::from("1"), } } } impl Default for OpenIdConnectRedirectBehavior { fn default() -> OpenIdConnectRedirectBehavior { - Self::Variant0 + Self::RedirectGet } } diff --git a/crates/bitwarden-api-api/src/models/organization_api_key_type.rs b/crates/bitwarden-api-api/src/models/organization_api_key_type.rs index 4790406e5..83f76baaa 100644 --- a/crates/bitwarden-api-api/src/models/organization_api_key_type.rs +++ b/crates/bitwarden-api-api/src/models/organization_api_key_type.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum OrganizationApiKeyType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, + Default = 0, + BillingSync = 1, + Scim = 2, } impl ToString for OrganizationApiKeyType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::Default => String::from("0"), + Self::BillingSync => String::from("1"), + Self::Scim => String::from("2"), } } } impl Default for OrganizationApiKeyType { fn default() -> OrganizationApiKeyType { - Self::Variant0 + Self::Default } } diff --git a/crates/bitwarden-api-api/src/models/organization_connection_type.rs b/crates/bitwarden-api-api/src/models/organization_connection_type.rs index eddf5460c..201c03ed2 100644 --- a/crates/bitwarden-api-api/src/models/organization_connection_type.rs +++ b/crates/bitwarden-api-api/src/models/organization_connection_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum OrganizationConnectionType { - Variant1 = 1, - Variant2 = 2, + CloudBillingSync = 1, + Scim = 2, } impl ToString for OrganizationConnectionType { fn to_string(&self) -> String { match self { - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::CloudBillingSync => String::from("1"), + Self::Scim => String::from("2"), } } } impl Default for OrganizationConnectionType { fn default() -> OrganizationConnectionType { - Self::Variant1 + Self::CloudBillingSync } } diff --git a/crates/bitwarden-api-api/src/models/organization_user_type.rs b/crates/bitwarden-api-api/src/models/organization_user_type.rs index e3642946d..38e415f05 100644 --- a/crates/bitwarden-api-api/src/models/organization_user_type.rs +++ b/crates/bitwarden-api-api/src/models/organization_user_type.rs @@ -14,27 +14,27 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum OrganizationUserType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, + Owner = 0, + Admin = 1, + User = 2, + Manager = 3, + Custom = 4, } impl ToString for OrganizationUserType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), + Self::Owner => String::from("0"), + Self::Admin => String::from("1"), + Self::User => String::from("2"), + Self::Manager => String::from("3"), + Self::Custom => String::from("4"), } } } impl Default for OrganizationUserType { fn default() -> OrganizationUserType { - Self::Variant0 + Self::Owner } } diff --git a/crates/bitwarden-api-api/src/models/payment_method_type.rs b/crates/bitwarden-api-api/src/models/payment_method_type.rs index 8df2830a4..c4d6cf93c 100644 --- a/crates/bitwarden-api-api/src/models/payment_method_type.rs +++ b/crates/bitwarden-api-api/src/models/payment_method_type.rs @@ -14,33 +14,33 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum PaymentMethodType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant8 = 8, - Variant255 = 255, + Card = 0, + BankAccount = 1, + PayPal = 2, + BitPay = 3, + Credit = 4, + WireTransfer = 5, + Check = 8, + None = 255, } impl ToString for PaymentMethodType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant8 => String::from("8"), - Self::Variant255 => String::from("255"), + Self::Card => String::from("0"), + Self::BankAccount => String::from("1"), + Self::PayPal => String::from("2"), + Self::BitPay => String::from("3"), + Self::Credit => String::from("4"), + Self::WireTransfer => String::from("5"), + Self::Check => String::from("8"), + Self::None => String::from("255"), } } } impl Default for PaymentMethodType { fn default() -> PaymentMethodType { - Self::Variant0 + Self::Card } } diff --git a/crates/bitwarden-api-api/src/models/plan_sponsorship_type.rs b/crates/bitwarden-api-api/src/models/plan_sponsorship_type.rs index 5e2a55824..02a750f3d 100644 --- a/crates/bitwarden-api-api/src/models/plan_sponsorship_type.rs +++ b/crates/bitwarden-api-api/src/models/plan_sponsorship_type.rs @@ -14,19 +14,19 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum PlanSponsorshipType { - Variant0 = 0, + FamiliesForEnterprise = 0, } impl ToString for PlanSponsorshipType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), + Self::FamiliesForEnterprise => String::from("0"), } } } impl Default for PlanSponsorshipType { fn default() -> PlanSponsorshipType { - Self::Variant0 + Self::FamiliesForEnterprise } } diff --git a/crates/bitwarden-api-api/src/models/plan_type.rs b/crates/bitwarden-api-api/src/models/plan_type.rs index a43634b19..109e9250e 100644 --- a/crates/bitwarden-api-api/src/models/plan_type.rs +++ b/crates/bitwarden-api-api/src/models/plan_type.rs @@ -14,51 +14,51 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum PlanType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, - Variant9 = 9, - Variant10 = 10, - Variant11 = 11, - Variant12 = 12, - Variant13 = 13, - Variant14 = 14, - Variant15 = 15, - Variant16 = 16, + Free = 0, + FamiliesAnnually2019 = 1, + TeamsMonthly2019 = 2, + TeamsAnnually2019 = 3, + EnterpriseMonthly2019 = 4, + EnterpriseAnnually2019 = 5, + Custom = 6, + FamiliesAnnually = 7, + TeamsMonthly2020 = 8, + TeamsAnnually2020 = 9, + EnterpriseMonthly2020 = 10, + EnterpriseAnnually2020 = 11, + TeamsMonthly = 12, + TeamsAnnually = 13, + EnterpriseMonthly = 14, + EnterpriseAnnually = 15, + TeamsStarter = 16, } impl ToString for PlanType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), - Self::Variant9 => String::from("9"), - Self::Variant10 => String::from("10"), - Self::Variant11 => String::from("11"), - Self::Variant12 => String::from("12"), - Self::Variant13 => String::from("13"), - Self::Variant14 => String::from("14"), - Self::Variant15 => String::from("15"), - Self::Variant16 => String::from("16"), + Self::Free => String::from("0"), + Self::FamiliesAnnually2019 => String::from("1"), + Self::TeamsMonthly2019 => String::from("2"), + Self::TeamsAnnually2019 => String::from("3"), + Self::EnterpriseMonthly2019 => String::from("4"), + Self::EnterpriseAnnually2019 => String::from("5"), + Self::Custom => String::from("6"), + Self::FamiliesAnnually => String::from("7"), + Self::TeamsMonthly2020 => String::from("8"), + 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"), } } } impl Default for PlanType { fn default() -> PlanType { - Self::Variant0 + Self::Free } } diff --git a/crates/bitwarden-api-api/src/models/policy_type.rs b/crates/bitwarden-api-api/src/models/policy_type.rs index dbb186a21..fc9e6ca63 100644 --- a/crates/bitwarden-api-api/src/models/policy_type.rs +++ b/crates/bitwarden-api-api/src/models/policy_type.rs @@ -14,41 +14,41 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum PolicyType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, - Variant9 = 9, - Variant10 = 10, - Variant11 = 11, + TwoFactorAuthentication = 0, + MasterPassword = 1, + PasswordGenerator = 2, + SingleOrg = 3, + RequireSso = 4, + PersonalOwnership = 5, + DisableSend = 6, + SendOptions = 7, + ResetPassword = 8, + MaximumVaultTimeout = 9, + DisablePersonalVaultExport = 10, + ActivateAutofill = 11, } impl ToString for PolicyType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), - Self::Variant9 => String::from("9"), - Self::Variant10 => String::from("10"), - Self::Variant11 => String::from("11"), + Self::TwoFactorAuthentication => String::from("0"), + Self::MasterPassword => String::from("1"), + Self::PasswordGenerator => String::from("2"), + Self::SingleOrg => String::from("3"), + Self::RequireSso => String::from("4"), + Self::PersonalOwnership => String::from("5"), + Self::DisableSend => String::from("6"), + Self::SendOptions => String::from("7"), + Self::ResetPassword => String::from("8"), + Self::MaximumVaultTimeout => String::from("9"), + Self::DisablePersonalVaultExport => String::from("10"), + Self::ActivateAutofill => String::from("11"), } } } impl Default for PolicyType { fn default() -> PolicyType { - Self::Variant0 + Self::TwoFactorAuthentication } } diff --git a/crates/bitwarden-api-api/src/models/product_type.rs b/crates/bitwarden-api-api/src/models/product_type.rs index aa4ebedc5..e60a9c57c 100644 --- a/crates/bitwarden-api-api/src/models/product_type.rs +++ b/crates/bitwarden-api-api/src/models/product_type.rs @@ -14,27 +14,27 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum ProductType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, + Free = 0, + Families = 1, + Teams = 2, + Enterprise = 3, + TeamsStarter = 4, } impl ToString for ProductType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), + Self::Free => String::from("0"), + Self::Families => String::from("1"), + Self::Teams => String::from("2"), + Self::Enterprise => String::from("3"), + Self::TeamsStarter => String::from("4"), } } } impl Default for ProductType { fn default() -> ProductType { - Self::Variant0 + Self::Free } } diff --git a/crates/bitwarden-api-api/src/models/provider_type.rs b/crates/bitwarden-api-api/src/models/provider_type.rs index 340210d32..f2d30a6cd 100644 --- a/crates/bitwarden-api-api/src/models/provider_type.rs +++ b/crates/bitwarden-api-api/src/models/provider_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum ProviderType { - Variant0 = 0, - Variant1 = 1, + Msp = 0, + Reseller = 1, } impl ToString for ProviderType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::Msp => String::from("0"), + Self::Reseller => String::from("1"), } } } impl Default for ProviderType { fn default() -> ProviderType { - Self::Variant0 + Self::Msp } } diff --git a/crates/bitwarden-api-api/src/models/provider_user_status_type.rs b/crates/bitwarden-api-api/src/models/provider_user_status_type.rs index 0918fe1d6..653dabbeb 100644 --- a/crates/bitwarden-api-api/src/models/provider_user_status_type.rs +++ b/crates/bitwarden-api-api/src/models/provider_user_status_type.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum ProviderUserStatusType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, + Invited = 0, + Accepted = 1, + Confirmed = 2, } impl ToString for ProviderUserStatusType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::Invited => String::from("0"), + Self::Accepted => String::from("1"), + Self::Confirmed => String::from("2"), } } } impl Default for ProviderUserStatusType { fn default() -> ProviderUserStatusType { - Self::Variant0 + Self::Invited } } diff --git a/crates/bitwarden-api-api/src/models/provider_user_type.rs b/crates/bitwarden-api-api/src/models/provider_user_type.rs index 28b130f8d..c51a3b932 100644 --- a/crates/bitwarden-api-api/src/models/provider_user_type.rs +++ b/crates/bitwarden-api-api/src/models/provider_user_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum ProviderUserType { - Variant0 = 0, - Variant1 = 1, + ProviderAdmin = 0, + ServiceUser = 1, } impl ToString for ProviderUserType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::ProviderAdmin => String::from("0"), + Self::ServiceUser => String::from("1"), } } } impl Default for ProviderUserType { fn default() -> ProviderUserType { - Self::Variant0 + Self::ProviderAdmin } } diff --git a/crates/bitwarden-api-api/src/models/push_type.rs b/crates/bitwarden-api-api/src/models/push_type.rs index fe38f85a7..8e69b5a73 100644 --- a/crates/bitwarden-api-api/src/models/push_type.rs +++ b/crates/bitwarden-api-api/src/models/push_type.rs @@ -14,51 +14,51 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum PushType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, - Variant9 = 9, - Variant10 = 10, - Variant11 = 11, - Variant12 = 12, - Variant13 = 13, - Variant14 = 14, - Variant15 = 15, - Variant16 = 16, + SyncCipherUpdate = 0, + SyncCipherCreate = 1, + SyncLoginDelete = 2, + SyncFolderDelete = 3, + SyncCiphers = 4, + SyncVault = 5, + SyncOrgKeys = 6, + SyncFolderCreate = 7, + SyncFolderUpdate = 8, + SyncCipherDelete = 9, + SyncSettings = 10, + LogOut = 11, + SyncSendCreate = 12, + SyncSendUpdate = 13, + SyncSendDelete = 14, + AuthRequest = 15, + AuthRequestResponse = 16, } impl ToString for PushType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), - Self::Variant9 => String::from("9"), - Self::Variant10 => String::from("10"), - Self::Variant11 => String::from("11"), - Self::Variant12 => String::from("12"), - Self::Variant13 => String::from("13"), - Self::Variant14 => String::from("14"), - Self::Variant15 => String::from("15"), - Self::Variant16 => String::from("16"), + Self::SyncCipherUpdate => String::from("0"), + Self::SyncCipherCreate => String::from("1"), + Self::SyncLoginDelete => String::from("2"), + Self::SyncFolderDelete => String::from("3"), + Self::SyncCiphers => String::from("4"), + Self::SyncVault => String::from("5"), + Self::SyncOrgKeys => String::from("6"), + Self::SyncFolderCreate => String::from("7"), + Self::SyncFolderUpdate => String::from("8"), + Self::SyncCipherDelete => String::from("9"), + Self::SyncSettings => String::from("10"), + Self::LogOut => String::from("11"), + Self::SyncSendCreate => String::from("12"), + Self::SyncSendUpdate => String::from("13"), + Self::SyncSendDelete => String::from("14"), + Self::AuthRequest => String::from("15"), + Self::AuthRequestResponse => String::from("16"), } } } impl Default for PushType { fn default() -> PushType { - Self::Variant0 + Self::SyncCipherUpdate } } diff --git a/crates/bitwarden-api-api/src/models/saml2_binding_type.rs b/crates/bitwarden-api-api/src/models/saml2_binding_type.rs index 039309cad..e01b398cd 100644 --- a/crates/bitwarden-api-api/src/models/saml2_binding_type.rs +++ b/crates/bitwarden-api-api/src/models/saml2_binding_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum Saml2BindingType { - Variant1 = 1, - Variant2 = 2, + HttpRedirect = 1, + HttpPost = 2, } impl ToString for Saml2BindingType { fn to_string(&self) -> String { match self { - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::HttpRedirect => String::from("1"), + Self::HttpPost => String::from("2"), } } } impl Default for Saml2BindingType { fn default() -> Saml2BindingType { - Self::Variant1 + Self::HttpRedirect } } diff --git a/crates/bitwarden-api-api/src/models/saml2_name_id_format.rs b/crates/bitwarden-api-api/src/models/saml2_name_id_format.rs index 6399c7f9b..e8680e9a6 100644 --- a/crates/bitwarden-api-api/src/models/saml2_name_id_format.rs +++ b/crates/bitwarden-api-api/src/models/saml2_name_id_format.rs @@ -14,35 +14,35 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum Saml2NameIdFormat { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, - Variant8 = 8, + NotConfigured = 0, + Unspecified = 1, + EmailAddress = 2, + X509SubjectName = 3, + WindowsDomainQualifiedName = 4, + KerberosPrincipalName = 5, + EntityIdentifier = 6, + Persistent = 7, + Transient = 8, } impl ToString for Saml2NameIdFormat { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), - Self::Variant8 => String::from("8"), + Self::NotConfigured => String::from("0"), + Self::Unspecified => String::from("1"), + Self::EmailAddress => String::from("2"), + Self::X509SubjectName => String::from("3"), + Self::WindowsDomainQualifiedName => String::from("4"), + Self::KerberosPrincipalName => String::from("5"), + Self::EntityIdentifier => String::from("6"), + Self::Persistent => String::from("7"), + Self::Transient => String::from("8"), } } } impl Default for Saml2NameIdFormat { fn default() -> Saml2NameIdFormat { - Self::Variant0 + Self::NotConfigured } } diff --git a/crates/bitwarden-api-api/src/models/saml2_signing_behavior.rs b/crates/bitwarden-api-api/src/models/saml2_signing_behavior.rs index 3b0668865..12be578aa 100644 --- a/crates/bitwarden-api-api/src/models/saml2_signing_behavior.rs +++ b/crates/bitwarden-api-api/src/models/saml2_signing_behavior.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum Saml2SigningBehavior { - Variant0 = 0, - Variant1 = 1, - Variant3 = 3, + IfIdpWantAuthnRequestsSigned = 0, + Always = 1, + Never = 3, } impl ToString for Saml2SigningBehavior { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant3 => String::from("3"), + Self::IfIdpWantAuthnRequestsSigned => String::from("0"), + Self::Always => String::from("1"), + Self::Never => String::from("3"), } } } impl Default for Saml2SigningBehavior { fn default() -> Saml2SigningBehavior { - Self::Variant0 + Self::IfIdpWantAuthnRequestsSigned } } diff --git a/crates/bitwarden-api-api/src/models/secure_note_type.rs b/crates/bitwarden-api-api/src/models/secure_note_type.rs index 9fd0a3158..dd8516f6e 100644 --- a/crates/bitwarden-api-api/src/models/secure_note_type.rs +++ b/crates/bitwarden-api-api/src/models/secure_note_type.rs @@ -14,19 +14,19 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum SecureNoteType { - Variant0 = 0, + Generic = 0, } impl ToString for SecureNoteType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), + Self::Generic => String::from("0"), } } } impl Default for SecureNoteType { fn default() -> SecureNoteType { - Self::Variant0 + Self::Generic } } diff --git a/crates/bitwarden-api-api/src/models/send_type.rs b/crates/bitwarden-api-api/src/models/send_type.rs index 5ea1c2504..6364c4af2 100644 --- a/crates/bitwarden-api-api/src/models/send_type.rs +++ b/crates/bitwarden-api-api/src/models/send_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum SendType { - Variant0 = 0, - Variant1 = 1, + Text = 0, + File = 1, } impl ToString for SendType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), + Self::Text => String::from("0"), + Self::File => String::from("1"), } } } impl Default for SendType { fn default() -> SendType { - Self::Variant0 + Self::Text } } diff --git a/crates/bitwarden-api-api/src/models/sso_type.rs b/crates/bitwarden-api-api/src/models/sso_type.rs index 3e1aefa4d..9ff337676 100644 --- a/crates/bitwarden-api-api/src/models/sso_type.rs +++ b/crates/bitwarden-api-api/src/models/sso_type.rs @@ -14,21 +14,21 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum SsoType { - Variant1 = 1, - Variant2 = 2, + OpenIdConnect = 1, + Saml2 = 2, } impl ToString for SsoType { fn to_string(&self) -> String { match self { - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::OpenIdConnect => String::from("1"), + Self::Saml2 => String::from("2"), } } } impl Default for SsoType { fn default() -> SsoType { - Self::Variant1 + Self::OpenIdConnect } } diff --git a/crates/bitwarden-api-api/src/models/transaction_type.rs b/crates/bitwarden-api-api/src/models/transaction_type.rs index c9cda7c76..1bb69ccbb 100644 --- a/crates/bitwarden-api-api/src/models/transaction_type.rs +++ b/crates/bitwarden-api-api/src/models/transaction_type.rs @@ -14,27 +14,27 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum TransactionType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, + Charge = 0, + Credit = 1, + PromotionalCredit = 2, + ReferralCredit = 3, + Refund = 4, } impl ToString for TransactionType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), + Self::Charge => String::from("0"), + Self::Credit => String::from("1"), + Self::PromotionalCredit => String::from("2"), + Self::ReferralCredit => String::from("3"), + Self::Refund => String::from("4"), } } } impl Default for TransactionType { fn default() -> TransactionType { - Self::Variant0 + Self::Charge } } diff --git a/crates/bitwarden-api-api/src/models/two_factor_provider_type.rs b/crates/bitwarden-api-api/src/models/two_factor_provider_type.rs index 00188f0fd..94d20ee2a 100644 --- a/crates/bitwarden-api-api/src/models/two_factor_provider_type.rs +++ b/crates/bitwarden-api-api/src/models/two_factor_provider_type.rs @@ -14,33 +14,33 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum TwoFactorProviderType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, - Variant6 = 6, - Variant7 = 7, + Authenticator = 0, + Email = 1, + Duo = 2, + YubiKey = 3, + U2f = 4, + Remember = 5, + OrganizationDuo = 6, + WebAuthn = 7, } impl ToString for TwoFactorProviderType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), - Self::Variant6 => String::from("6"), - Self::Variant7 => String::from("7"), + Self::Authenticator => String::from("0"), + Self::Email => String::from("1"), + Self::Duo => String::from("2"), + Self::YubiKey => String::from("3"), + Self::U2f => String::from("4"), + Self::Remember => String::from("5"), + Self::OrganizationDuo => String::from("6"), + Self::WebAuthn => String::from("7"), } } } impl Default for TwoFactorProviderType { fn default() -> TwoFactorProviderType { - Self::Variant0 + Self::Authenticator } } diff --git a/crates/bitwarden-api-api/src/models/uri_match_type.rs b/crates/bitwarden-api-api/src/models/uri_match_type.rs index f4ee450c1..6ccf82edb 100644 --- a/crates/bitwarden-api-api/src/models/uri_match_type.rs +++ b/crates/bitwarden-api-api/src/models/uri_match_type.rs @@ -14,29 +14,29 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum UriMatchType { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, - Variant3 = 3, - Variant4 = 4, - Variant5 = 5, + Domain = 0, + Host = 1, + StartsWith = 2, + Exact = 3, + RegularExpression = 4, + Never = 5, } impl ToString for UriMatchType { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), - Self::Variant3 => String::from("3"), - Self::Variant4 => String::from("4"), - Self::Variant5 => String::from("5"), + Self::Domain => String::from("0"), + Self::Host => String::from("1"), + Self::StartsWith => String::from("2"), + Self::Exact => String::from("3"), + Self::RegularExpression => String::from("4"), + Self::Never => String::from("5"), } } } impl Default for UriMatchType { fn default() -> UriMatchType { - Self::Variant0 + Self::Domain } } diff --git a/crates/bitwarden-api-api/src/models/web_authn_prf_status.rs b/crates/bitwarden-api-api/src/models/web_authn_prf_status.rs index eb58bfdcc..074c402dc 100644 --- a/crates/bitwarden-api-api/src/models/web_authn_prf_status.rs +++ b/crates/bitwarden-api-api/src/models/web_authn_prf_status.rs @@ -14,23 +14,23 @@ Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr, )] pub enum WebAuthnPrfStatus { - Variant0 = 0, - Variant1 = 1, - Variant2 = 2, + Enabled = 0, + Supported = 1, + Unsupported = 2, } impl ToString for WebAuthnPrfStatus { fn to_string(&self) -> String { match self { - Self::Variant0 => String::from("0"), - Self::Variant1 => String::from("1"), - Self::Variant2 => String::from("2"), + Self::Enabled => String::from("0"), + Self::Supported => String::from("1"), + Self::Unsupported => String::from("2"), } } } impl Default for WebAuthnPrfStatus { fn default() -> WebAuthnPrfStatus { - Self::Variant0 + Self::Enabled } } diff --git a/crates/bitwarden-api-identity/.openapi-generator/FILES b/crates/bitwarden-api-identity/.openapi-generator/FILES index 968fd8fe4..af978071e 100644 --- a/crates/bitwarden-api-identity/.openapi-generator/FILES +++ b/crates/bitwarden-api-identity/.openapi-generator/FILES @@ -7,17 +7,10 @@ src/apis/info_api.rs src/apis/mod.rs src/apis/sso_api.rs src/lib.rs -src/models/assertion_options.rs -src/models/authentication_extensions_client_inputs.rs -src/models/authenticator_transport.rs src/models/kdf_type.rs src/models/keys_request_model.rs src/models/mod.rs src/models/prelogin_request_model.rs src/models/prelogin_response_model.rs -src/models/public_key_credential_descriptor.rs -src/models/public_key_credential_type.rs src/models/register_request_model.rs src/models/register_response_model.rs -src/models/user_verification_requirement.rs -src/models/web_authn_login_assertion_options_response_model.rs diff --git a/crates/bitwarden-api-identity/README.md b/crates/bitwarden-api-identity/README.md index bb190aaad..8288a18e5 100644 --- a/crates/bitwarden-api-identity/README.md +++ b/crates/bitwarden-api-identity/README.md @@ -26,38 +26,30 @@ bitwarden-api-identity = { path = "./bitwarden-api-identity" } All URIs are relative to _http://localhost_ -| Class | Method | HTTP request | Description | -| ------------- | ---------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ----------- | -| _AccountsApi_ | [**accounts_prelogin_post**](docs/AccountsApi.md#accounts_prelogin_post) | **POST** /accounts/prelogin | -| _AccountsApi_ | [**accounts_register_post**](docs/AccountsApi.md#accounts_register_post) | **POST** /accounts/register | -| _AccountsApi_ | [**accounts_webauthn_assertion_options_get**](docs/AccountsApi.md#accounts_webauthn_assertion_options_get) | **GET** /accounts/webauthn/assertion-options | -| _InfoApi_ | [**alive_get**](docs/InfoApi.md#alive_get) | **GET** /alive | -| _InfoApi_ | [**now_get**](docs/InfoApi.md#now_get) | **GET** /now | -| _InfoApi_ | [**version_get**](docs/InfoApi.md#version_get) | **GET** /version | -| _SsoApi_ | [**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 | -| _SsoApi_ | [**sso_pre_validate_get**](docs/SsoApi.md#sso_pre_validate_get) | **GET** /sso/PreValidate | +| Class | Method | HTTP request | Description | +| ------------- | ----------------------------------------------------------------------------------- | ---------------------------------- | ----------- | +| _AccountsApi_ | [**accounts_prelogin_post**](docs/AccountsApi.md#accounts_prelogin_post) | **POST** /accounts/prelogin | +| _AccountsApi_ | [**accounts_register_post**](docs/AccountsApi.md#accounts_register_post) | **POST** /accounts/register | +| _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 | +| _SsoApi_ | [**sso_pre_validate_get**](docs/SsoApi.md#sso_pre_validate_get) | **GET** /sso/PreValidate | ## Documentation For Models -- [AssertionOptions](docs/AssertionOptions.md) -- [AuthenticationExtensionsClientInputs](docs/AuthenticationExtensionsClientInputs.md) -- [AuthenticatorTransport](docs/AuthenticatorTransport.md) - [KdfType](docs/KdfType.md) - [KeysRequestModel](docs/KeysRequestModel.md) - [PreloginRequestModel](docs/PreloginRequestModel.md) - [PreloginResponseModel](docs/PreloginResponseModel.md) -- [PublicKeyCredentialDescriptor](docs/PublicKeyCredentialDescriptor.md) -- [PublicKeyCredentialType](docs/PublicKeyCredentialType.md) - [RegisterRequestModel](docs/RegisterRequestModel.md) - [RegisterResponseModel](docs/RegisterResponseModel.md) -- [UserVerificationRequirement](docs/UserVerificationRequirement.md) -- [WebAuthnLoginAssertionOptionsResponseModel](docs/WebAuthnLoginAssertionOptionsResponseModel.md) To get access to the crate's generated documentation, use: diff --git a/crates/bitwarden-api-identity/src/apis/accounts_api.rs b/crates/bitwarden-api-identity/src/apis/accounts_api.rs index c7b0bd1fd..efffdae3d 100644 --- a/crates/bitwarden-api-identity/src/apis/accounts_api.rs +++ b/crates/bitwarden-api-identity/src/apis/accounts_api.rs @@ -27,13 +27,6 @@ pub enum AccountsRegisterPostError { UnknownValue(serde_json::Value), } -/// struct for typed errors of method [`accounts_webauthn_assertion_options_get`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AccountsWebauthnAssertionOptionsGetError { - UnknownValue(serde_json::Value), -} - pub async fn accounts_prelogin_post( configuration: &configuration::Configuration, prelogin_request_model: Option, @@ -109,45 +102,3 @@ pub async fn accounts_register_post( Err(Error::ResponseError(local_var_error)) } } - -pub async fn accounts_webauthn_assertion_options_get( - configuration: &configuration::Configuration, -) -> Result< - crate::models::WebAuthnLoginAssertionOptionsResponseModel, - Error, -> { - let local_var_configuration = configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!( - "{}/accounts/webauthn/assertion-options", - 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() { - 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)) - } -} diff --git a/crates/bitwarden-api-identity/src/models/mod.rs b/crates/bitwarden-api-identity/src/models/mod.rs index 715e29686..0464a3ea9 100644 --- a/crates/bitwarden-api-identity/src/models/mod.rs +++ b/crates/bitwarden-api-identity/src/models/mod.rs @@ -1,9 +1,3 @@ -pub mod assertion_options; -pub use self::assertion_options::AssertionOptions; -pub mod authentication_extensions_client_inputs; -pub use self::authentication_extensions_client_inputs::AuthenticationExtensionsClientInputs; -pub mod authenticator_transport; -pub use self::authenticator_transport::AuthenticatorTransport; pub mod kdf_type; pub use self::kdf_type::KdfType; pub mod keys_request_model; @@ -12,15 +6,7 @@ pub mod prelogin_request_model; pub use self::prelogin_request_model::PreloginRequestModel; pub mod prelogin_response_model; pub use self::prelogin_response_model::PreloginResponseModel; -pub mod public_key_credential_descriptor; -pub use self::public_key_credential_descriptor::PublicKeyCredentialDescriptor; -pub mod public_key_credential_type; -pub use self::public_key_credential_type::PublicKeyCredentialType; pub mod register_request_model; pub use self::register_request_model::RegisterRequestModel; pub mod register_response_model; pub use self::register_response_model::RegisterResponseModel; -pub mod user_verification_requirement; -pub use self::user_verification_requirement::UserVerificationRequirement; -pub mod web_authn_login_assertion_options_response_model; -pub use self::web_authn_login_assertion_options_response_model::WebAuthnLoginAssertionOptionsResponseModel; diff --git a/crates/bitwarden-api-identity/src/models/prelogin_response_model.rs b/crates/bitwarden-api-identity/src/models/prelogin_response_model.rs index a8935137d..7a84d75ed 100644 --- a/crates/bitwarden-api-identity/src/models/prelogin_response_model.rs +++ b/crates/bitwarden-api-identity/src/models/prelogin_response_model.rs @@ -10,10 +10,10 @@ #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct PreloginResponseModel { - #[serde(rename = "kdf", skip_serializing_if = "Option::is_none")] - pub kdf: Option, - #[serde(rename = "kdfIterations", skip_serializing_if = "Option::is_none")] - pub kdf_iterations: Option, + #[serde(rename = "kdf")] + pub kdf: crate::models::KdfType, + #[serde(rename = "kdfIterations")] + pub kdf_iterations: i32, #[serde(rename = "kdfMemory", skip_serializing_if = "Option::is_none")] pub kdf_memory: Option, #[serde(rename = "kdfParallelism", skip_serializing_if = "Option::is_none")] @@ -21,10 +21,10 @@ pub struct PreloginResponseModel { } impl PreloginResponseModel { - pub fn new() -> PreloginResponseModel { + pub fn new(kdf: crate::models::KdfType, kdf_iterations: i32) -> PreloginResponseModel { PreloginResponseModel { - kdf: None, - kdf_iterations: None, + kdf, + kdf_iterations, kdf_memory: None, kdf_parallelism: None, }