From 36780c5ef83bfc53aaf17c103b5bfd94c4d36376 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 9 Apr 2019 17:14:16 -0400 Subject: [PATCH] lots of enums --- src/Core/Enums/CipherType.cs | 12 ++++++ src/Core/Enums/DeviceType.cs | 50 +++++++++++++++++++++++++ src/Core/Enums/FieldType.cs | 9 +++++ src/Core/Enums/PaymentMethodType.cs | 20 ++++++++++ src/Core/Enums/PlanType.cs | 22 +++++++++++ src/Core/Enums/SecureNoteType.cs | 7 ++++ src/Core/Enums/TransactionType.cs | 18 +++++++++ src/Core/Enums/TwoFactorProviderType.cs | 13 +++++++ src/Core/Enums/UriMatchType.cs | 12 ++++++ 9 files changed, 163 insertions(+) create mode 100644 src/Core/Enums/CipherType.cs create mode 100644 src/Core/Enums/DeviceType.cs create mode 100644 src/Core/Enums/FieldType.cs create mode 100644 src/Core/Enums/PaymentMethodType.cs create mode 100644 src/Core/Enums/PlanType.cs create mode 100644 src/Core/Enums/SecureNoteType.cs create mode 100644 src/Core/Enums/TransactionType.cs create mode 100644 src/Core/Enums/TwoFactorProviderType.cs create mode 100644 src/Core/Enums/UriMatchType.cs diff --git a/src/Core/Enums/CipherType.cs b/src/Core/Enums/CipherType.cs new file mode 100644 index 000000000..0aca94864 --- /dev/null +++ b/src/Core/Enums/CipherType.cs @@ -0,0 +1,12 @@ +namespace Bit.Core.Enums +{ + public enum CipherType : byte + { + // Folder is deprecated + //Folder = 0, + Login = 1, + SecureNote = 2, + Card = 3, + Identity = 4 + } +} diff --git a/src/Core/Enums/DeviceType.cs b/src/Core/Enums/DeviceType.cs new file mode 100644 index 000000000..53aa21c76 --- /dev/null +++ b/src/Core/Enums/DeviceType.cs @@ -0,0 +1,50 @@ +using System.ComponentModel.DataAnnotations; + +namespace Bit.Core.Enums +{ + public enum DeviceType : byte + { + [Display(Name = "Android")] + Android = 0, + [Display(Name = "iOS")] + iOS = 1, + [Display(Name = "Chrome Extension")] + ChromeExtension = 2, + [Display(Name = "Firefox Extension")] + FirefoxExtension = 3, + [Display(Name = "Opera Extension")] + OperaExtension = 4, + [Display(Name = "Edge Extension")] + EdgeExtension = 5, + [Display(Name = "Windows")] + WindowsDesktop = 6, + [Display(Name = "macOS")] + MacOsDesktop = 7, + [Display(Name = "Linux")] + LinuxDesktop = 8, + [Display(Name = "Chrome")] + ChromeBrowser = 9, + [Display(Name = "Firefox")] + FirefoxBrowser = 10, + [Display(Name = "Opera")] + OperaBrowser = 11, + [Display(Name = "Edge")] + EdgeBrowser = 12, + [Display(Name = "Internet Explorer")] + IEBrowser = 13, + [Display(Name = "Unknown Browser")] + UnknownBrowser = 14, + [Display(Name = "Android")] + AndroidAmazon = 15, + [Display(Name = "UWP")] + UWP = 16, + [Display(Name = "Safari")] + SafariBrowser = 17, + [Display(Name = "Vivaldi")] + VivaldiBrowser = 18, + [Display(Name = "Vivaldi Extension")] + VivaldiExtension = 19, + [Display(Name = "Safari Extension")] + SafariExtension = 20 + } +} diff --git a/src/Core/Enums/FieldType.cs b/src/Core/Enums/FieldType.cs new file mode 100644 index 000000000..bf30d4f12 --- /dev/null +++ b/src/Core/Enums/FieldType.cs @@ -0,0 +1,9 @@ +namespace Bit.Core.Enums +{ + public enum FieldType : byte + { + Text = 0, + Hidden = 1, + Boolean = 2 + } +} diff --git a/src/Core/Enums/PaymentMethodType.cs b/src/Core/Enums/PaymentMethodType.cs new file mode 100644 index 000000000..07ce1a5d8 --- /dev/null +++ b/src/Core/Enums/PaymentMethodType.cs @@ -0,0 +1,20 @@ +using System.ComponentModel.DataAnnotations; + +namespace Bit.Core.Enums +{ + public enum PaymentMethodType : byte + { + [Display(Name = "Card")] + Card = 0, + [Display(Name = "Bank Account")] + BankAccount = 1, + [Display(Name = "PayPal")] + PayPal = 2, + [Display(Name = "BitPay")] + BitPay = 3, + [Display(Name = "Credit")] + Credit = 4, + [Display(Name = "Wire Transfer")] + WireTransfer = 5, + } +} diff --git a/src/Core/Enums/PlanType.cs b/src/Core/Enums/PlanType.cs new file mode 100644 index 000000000..df02b8bf7 --- /dev/null +++ b/src/Core/Enums/PlanType.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace Bit.Core.Enums +{ + public enum PlanType : byte + { + [Display(Name = "Free")] + Free = 0, + [Display(Name = "Families")] + FamiliesAnnually = 1, + [Display(Name = "Teams (Monthly)")] + TeamsMonthly = 2, + [Display(Name = "Teams (Annually)")] + TeamsAnnually = 3, + [Display(Name = "Enterprise (Monthly)")] + EnterpriseMonthly = 4, + [Display(Name = "Enterprise (Annually)")] + EnterpriseAnnually = 5, + [Display(Name = "Custom")] + Custom = 6 + } +} diff --git a/src/Core/Enums/SecureNoteType.cs b/src/Core/Enums/SecureNoteType.cs new file mode 100644 index 000000000..cc84edfc3 --- /dev/null +++ b/src/Core/Enums/SecureNoteType.cs @@ -0,0 +1,7 @@ +namespace Bit.Core.Enums +{ + public enum SecureNoteType : byte + { + Generic = 0 + } +} diff --git a/src/Core/Enums/TransactionType.cs b/src/Core/Enums/TransactionType.cs new file mode 100644 index 000000000..02556ae1d --- /dev/null +++ b/src/Core/Enums/TransactionType.cs @@ -0,0 +1,18 @@ +using System.ComponentModel.DataAnnotations; + +namespace Bit.Core.Enums +{ + public enum TransactionType : byte + { + [Display(Name = "Charge")] + Charge = 0, + [Display(Name = "Credit")] + Credit = 1, + [Display(Name = "Promotional Credit")] + PromotionalCredit = 2, + [Display(Name = "Referral Credit")] + ReferralCredit = 3, + [Display(Name = "Refund")] + Refund = 4, + } +} diff --git a/src/Core/Enums/TwoFactorProviderType.cs b/src/Core/Enums/TwoFactorProviderType.cs new file mode 100644 index 000000000..1a1b7ffc9 --- /dev/null +++ b/src/Core/Enums/TwoFactorProviderType.cs @@ -0,0 +1,13 @@ +namespace Bit.Core.Enums +{ + public enum TwoFactorProviderType : byte + { + Authenticator = 0, + Email = 1, + Duo = 2, + YubiKey = 3, + U2f = 4, + Remember = 5, + OrganizationDuo = 6 + } +} diff --git a/src/Core/Enums/UriMatchType.cs b/src/Core/Enums/UriMatchType.cs new file mode 100644 index 000000000..569437298 --- /dev/null +++ b/src/Core/Enums/UriMatchType.cs @@ -0,0 +1,12 @@ +namespace Bit.Core.Enums +{ + public enum UriMatchType : byte + { + Domain = 0, + Host = 1, + StartsWith = 2, + Exact = 3, + RegularExpression = 4, + Never = 5 + } +}