mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
Split jslib into multiple modules (#363)
* Split jslib into multiple modules
This commit is contained in:
4
common/src/enums/cipherRepromptType.ts
Normal file
4
common/src/enums/cipherRepromptType.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum CipherRepromptType {
|
||||
None = 0,
|
||||
Password = 1,
|
||||
}
|
||||
6
common/src/enums/cipherType.ts
Normal file
6
common/src/enums/cipherType.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum CipherType {
|
||||
Login = 1,
|
||||
SecureNote = 2,
|
||||
Card = 3,
|
||||
Identity = 4,
|
||||
}
|
||||
23
common/src/enums/deviceType.ts
Normal file
23
common/src/enums/deviceType.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export enum DeviceType {
|
||||
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,
|
||||
}
|
||||
7
common/src/enums/emergencyAccessStatusType.ts
Normal file
7
common/src/enums/emergencyAccessStatusType.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum EmergencyAccessStatusType {
|
||||
Invited = 0,
|
||||
Accepted = 1,
|
||||
Confirmed = 2,
|
||||
RecoveryInitiated = 3,
|
||||
RecoveryApproved = 4,
|
||||
}
|
||||
5
common/src/enums/emergencyAccessType.ts
Normal file
5
common/src/enums/emergencyAccessType.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum EmergencyAccessType
|
||||
{
|
||||
View = 0,
|
||||
Takeover = 1,
|
||||
}
|
||||
9
common/src/enums/encryptionType.ts
Normal file
9
common/src/enums/encryptionType.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export enum EncryptionType {
|
||||
AesCbc256_B64 = 0,
|
||||
AesCbc128_HmacSha256_B64 = 1,
|
||||
AesCbc256_HmacSha256_B64 = 2,
|
||||
Rsa2048_OaepSha256_B64 = 3,
|
||||
Rsa2048_OaepSha1_B64 = 4,
|
||||
Rsa2048_OaepSha256_HmacSha256_B64 = 5,
|
||||
Rsa2048_OaepSha1_HmacSha256_B64 = 6,
|
||||
}
|
||||
53
common/src/enums/eventType.ts
Normal file
53
common/src/enums/eventType.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
export enum EventType {
|
||||
User_LoggedIn = 1000,
|
||||
User_ChangedPassword = 1001,
|
||||
User_Updated2fa = 1002,
|
||||
User_Disabled2fa = 1003,
|
||||
User_Recovered2fa = 1004,
|
||||
User_FailedLogIn = 1005,
|
||||
User_FailedLogIn2fa = 1006,
|
||||
User_ClientExportedVault = 1007,
|
||||
|
||||
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,
|
||||
|
||||
Organization_Updated = 1600,
|
||||
Organization_PurgedVault = 1601,
|
||||
// Organization_ClientExportedVault = 1602,
|
||||
|
||||
Policy_Updated = 1700,
|
||||
}
|
||||
5
common/src/enums/fieldType.ts
Normal file
5
common/src/enums/fieldType.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum FieldType {
|
||||
Text = 0,
|
||||
Hidden = 1,
|
||||
Boolean = 2,
|
||||
}
|
||||
4
common/src/enums/fileUploadType.ts
Normal file
4
common/src/enums/fileUploadType.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum FileUploadType {
|
||||
Direct = 0,
|
||||
Azure = 1,
|
||||
}
|
||||
8
common/src/enums/index.ts
Normal file
8
common/src/enums/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export { CipherType } from './cipherType';
|
||||
export { DeviceType } from './deviceType';
|
||||
export { EncryptionType } from './encryptionType';
|
||||
export { FieldType } from './fieldType';
|
||||
export { LogLevelType } from './logLevelType';
|
||||
export { SecureNoteType } from './secureNoteType';
|
||||
export { TwoFactorProviderType } from './twoFactorProviderType';
|
||||
export { UriMatchType } from './uriMatchType';
|
||||
3
common/src/enums/kdfType.ts
Normal file
3
common/src/enums/kdfType.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export enum KdfType {
|
||||
PBKDF2_SHA256 = 0,
|
||||
}
|
||||
6
common/src/enums/logLevelType.ts
Normal file
6
common/src/enums/logLevelType.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum LogLevelType {
|
||||
Debug,
|
||||
Info,
|
||||
Warning,
|
||||
Error,
|
||||
}
|
||||
20
common/src/enums/notificationType.ts
Normal file
20
common/src/enums/notificationType.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export enum NotificationType {
|
||||
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,
|
||||
}
|
||||
5
common/src/enums/organizationUserStatusType.ts
Normal file
5
common/src/enums/organizationUserStatusType.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum OrganizationUserStatusType {
|
||||
Invited = 0,
|
||||
Accepted = 1,
|
||||
Confirmed = 2,
|
||||
}
|
||||
7
common/src/enums/organizationUserType.ts
Normal file
7
common/src/enums/organizationUserType.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum OrganizationUserType {
|
||||
Owner = 0,
|
||||
Admin = 1,
|
||||
User = 2,
|
||||
Manager = 3,
|
||||
Custom = 4,
|
||||
}
|
||||
11
common/src/enums/paymentMethodType.ts
Normal file
11
common/src/enums/paymentMethodType.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export enum PaymentMethodType {
|
||||
Card = 0,
|
||||
BankAccount = 1,
|
||||
PayPal = 2,
|
||||
BitPay = 3,
|
||||
Credit = 4,
|
||||
WireTransfer = 5,
|
||||
AppleInApp = 6,
|
||||
GoogleInApp = 7,
|
||||
Check = 8,
|
||||
}
|
||||
13
common/src/enums/permissions.ts
Normal file
13
common/src/enums/permissions.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export enum Permissions {
|
||||
AccessBusinessPortal,
|
||||
AccessEventLogs,
|
||||
AccessImportExport,
|
||||
AccessReports,
|
||||
ManageAllCollections,
|
||||
ManageAssignedCollections,
|
||||
ManageGroups,
|
||||
ManageOrganization,
|
||||
ManagePolicies,
|
||||
ManageUsers,
|
||||
ManageUsersPassword,
|
||||
}
|
||||
14
common/src/enums/planType.ts
Normal file
14
common/src/enums/planType.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export enum PlanType {
|
||||
Free = 0,
|
||||
FamiliesAnnually2019 = 1,
|
||||
TeamsMonthly2019 = 2,
|
||||
TeamsAnnually2019 = 3,
|
||||
EnterpriseMonthly2019 = 4,
|
||||
EnterpriseAnnually2019 = 5,
|
||||
Custom = 6,
|
||||
FamiliesAnnually = 7,
|
||||
TeamsMonthly = 8,
|
||||
TeamsAnnually = 9,
|
||||
EnterpriseMonthly = 10,
|
||||
EnterpriseAnnually = 11,
|
||||
}
|
||||
11
common/src/enums/policyType.ts
Normal file
11
common/src/enums/policyType.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export enum PolicyType {
|
||||
TwoFactorAuthentication = 0, // Requires users to have 2fa enabled
|
||||
MasterPassword = 1, // Sets minimum requirements for master password complexity
|
||||
PasswordGenerator = 2, // Sets minimum requirements/default type for generated passwords/passphrases
|
||||
SingleOrg = 3, // Allows users to only be apart of one organization
|
||||
RequireSso = 4, // Requires users to authenticate with SSO
|
||||
PersonalOwnership = 5, // Disables personal vault ownership for adding/cloning items
|
||||
DisableSend = 6, // Disables the ability to create and edit Bitwarden Sends
|
||||
SendOptions = 7, // Sets restrictions or defaults for Bitwarden Sends
|
||||
ResetPassword = 8, // Allows orgs to use reset password : also can enable auto-enrollment during invite flow
|
||||
}
|
||||
6
common/src/enums/productType.ts
Normal file
6
common/src/enums/productType.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export enum ProductType {
|
||||
Free = 0,
|
||||
Families = 1,
|
||||
Teams = 2,
|
||||
Enterprise = 3,
|
||||
}
|
||||
3
common/src/enums/secureNoteType.ts
Normal file
3
common/src/enums/secureNoteType.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export enum SecureNoteType {
|
||||
Generic = 0,
|
||||
}
|
||||
4
common/src/enums/sendType.ts
Normal file
4
common/src/enums/sendType.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum SendType {
|
||||
Text = 0,
|
||||
File = 1,
|
||||
}
|
||||
7
common/src/enums/transactionType.ts
Normal file
7
common/src/enums/transactionType.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export enum TransactionType {
|
||||
Charge = 0,
|
||||
Credit = 1,
|
||||
PromotionalCredit = 2,
|
||||
ReferralCredit = 3,
|
||||
Refund = 4,
|
||||
}
|
||||
10
common/src/enums/twoFactorProviderType.ts
Normal file
10
common/src/enums/twoFactorProviderType.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export enum TwoFactorProviderType {
|
||||
Authenticator = 0,
|
||||
Email = 1,
|
||||
Duo = 2,
|
||||
Yubikey = 3,
|
||||
U2f = 4,
|
||||
Remember = 5,
|
||||
OrganizationDuo = 6,
|
||||
WebAuthn = 7,
|
||||
}
|
||||
8
common/src/enums/uriMatchType.ts
Normal file
8
common/src/enums/uriMatchType.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export enum UriMatchType {
|
||||
Domain = 0,
|
||||
Host = 1,
|
||||
StartsWith = 2,
|
||||
Exact = 3,
|
||||
RegularExpression = 4,
|
||||
Never = 5,
|
||||
}
|
||||
Reference in New Issue
Block a user