mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
fix(enums-eslint): Enum Rule for ESLint (#14650)
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint. * fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums. * fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums. * fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion. Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com> * refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations. * fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places. * fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
This commit is contained in:
committed by
GitHub
parent
9f3310ed7e
commit
0b0397c3f0
@@ -21,6 +21,8 @@ export const RedirectFocusDirection = {
|
|||||||
Next: "next",
|
Next: "next",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum InlineMenuFillType {
|
export enum InlineMenuFillType {
|
||||||
AccountCreationUsername = 5,
|
AccountCreationUsername = 5,
|
||||||
PasswordGeneration = 6,
|
PasswordGeneration = 6,
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import {
|
|||||||
AssertCredentialResult,
|
AssertCredentialResult,
|
||||||
} from "@bitwarden/common/platform/abstractions/fido2/fido2-client.service.abstraction";
|
} from "@bitwarden/common/platform/abstractions/fido2/fido2-client.service.abstraction";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum MessageType {
|
export enum MessageType {
|
||||||
CredentialCreationRequest,
|
CredentialCreationRequest,
|
||||||
CredentialCreationResponse,
|
CredentialCreationResponse,
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
|
|||||||
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
|
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
|
||||||
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
|
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum SendState {
|
export enum SendState {
|
||||||
Empty,
|
Empty,
|
||||||
NoResults,
|
NoResults,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
import { I18nPipe } from "@bitwarden/ui-common";
|
import { I18nPipe } from "@bitwarden/ui-common";
|
||||||
import { DarkImageSourceDirective, VaultCarouselModule } from "@bitwarden/vault";
|
import { DarkImageSourceDirective, VaultCarouselModule } from "@bitwarden/vault";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AtRiskCarouselDialogResult {
|
export enum AtRiskCarouselDialogResult {
|
||||||
Dismissed = "dismissed",
|
Dismissed = "dismissed",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ export interface GeneratorDialogResult {
|
|||||||
generatedValue?: string;
|
generatedValue?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum GeneratorDialogAction {
|
export enum GeneratorDialogAction {
|
||||||
Selected = "selected",
|
Selected = "selected",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ import { VaultPageService } from "./vault-page.service";
|
|||||||
|
|
||||||
import { AutofillVaultListItemsComponent, VaultListItemsContainerComponent } from ".";
|
import { AutofillVaultListItemsComponent, VaultListItemsContainerComponent } from ".";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum VaultState {
|
enum VaultState {
|
||||||
Empty,
|
Empty,
|
||||||
NoResults,
|
NoResults,
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ const DEFAULT_MESSAGE_TIMEOUT = 10 * 1000; // 10 seconds
|
|||||||
|
|
||||||
export type MessageHandler = (MessageCommon) => void;
|
export type MessageHandler = (MessageCommon) => void;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum IPCConnectionState {
|
export enum IPCConnectionState {
|
||||||
Disconnected = "disconnected",
|
Disconnected = "disconnected",
|
||||||
Connecting = "connecting",
|
Connecting = "connecting",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import { SearchBarService } from "../../layout/search/search-bar.service";
|
|||||||
|
|
||||||
import { AddEditComponent } from "./add-edit.component";
|
import { AddEditComponent } from "./add-edit.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum Action {
|
enum Action {
|
||||||
None = "",
|
None = "",
|
||||||
Add = "add",
|
Add = "add",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum SshAgentPromptType {
|
export enum SshAgentPromptType {
|
||||||
Always = "always",
|
Always = "always",
|
||||||
Never = "never",
|
Never = "never",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BiometricAction {
|
export enum BiometricAction {
|
||||||
Authenticate = "authenticate",
|
Authenticate = "authenticate",
|
||||||
GetStatus = "status",
|
GetStatus = "status",
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ export interface CredentialGeneratorDialogResult {
|
|||||||
generatedValue?: string;
|
generatedValue?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CredentialGeneratorDialogAction {
|
export enum CredentialGeneratorDialogAction {
|
||||||
Selected = "selected",
|
Selected = "selected",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ export interface BulkCollectionsDialogParams {
|
|||||||
collections: CollectionView[];
|
collections: CollectionView[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BulkCollectionsDialogResult {
|
export enum BulkCollectionsDialogResult {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -132,6 +132,8 @@ import { VaultHeaderComponent } from "./vault-header/vault-header.component";
|
|||||||
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
const BroadcasterSubscriptionId = "OrgVaultComponent";
|
||||||
const SearchTextDebounceInterval = 200;
|
const SearchTextDebounceInterval = 200;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum AddAccessStatusType {
|
enum AddAccessStatusType {
|
||||||
All = 0,
|
All = 0,
|
||||||
AddAccess = 1,
|
AddAccess = 1,
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ import { AddEditGroupDetail } from "./../core/views/add-edit-group-detail";
|
|||||||
/**
|
/**
|
||||||
* Indices for the available tabs in the dialog
|
* Indices for the available tabs in the dialog
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum GroupAddEditTabType {
|
export enum GroupAddEditTabType {
|
||||||
Info = 0,
|
Info = 0,
|
||||||
Members = 1,
|
Members = 1,
|
||||||
@@ -82,6 +84,8 @@ export interface GroupAddEditDialogParams {
|
|||||||
initialTab?: GroupAddEditTabType;
|
initialTab?: GroupAddEditTabType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum GroupAddEditDialogResultType {
|
export enum GroupAddEditDialogResultType {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ import { commaSeparatedEmails } from "./validators/comma-separated-emails.valida
|
|||||||
import { inputEmailLimitValidator } from "./validators/input-email-limit.validator";
|
import { inputEmailLimitValidator } from "./validators/input-email-limit.validator";
|
||||||
import { orgSeatLimitReachedValidator } from "./validators/org-seat-limit-reached.validator";
|
import { orgSeatLimitReachedValidator } from "./validators/org-seat-limit-reached.validator";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum MemberDialogTab {
|
export enum MemberDialogTab {
|
||||||
Role = 0,
|
Role = 0,
|
||||||
Groups = 1,
|
Groups = 1,
|
||||||
@@ -92,6 +94,8 @@ export interface EditMemberDialogParams extends CommonMemberDialogParams {
|
|||||||
|
|
||||||
export type MemberDialogParams = EditMemberDialogParams | AddMemberDialogParams;
|
export type MemberDialogParams = EditMemberDialogParams | AddMemberDialogParams;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum MemberDialogResult {
|
export enum MemberDialogResult {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ export type ResetPasswordDialogData = {
|
|||||||
organizationId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ResetPasswordDialogResult {
|
export enum ResetPasswordDialogResult {
|
||||||
Ok = "ok",
|
Ok = "ok",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export type PolicyEditDialogData = {
|
|||||||
organizationId: string;
|
organizationId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PolicyEditDialogResult {
|
export enum PolicyEditDialogResult {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
UpgradePlan = "upgrade-plan",
|
UpgradePlan = "upgrade-plan",
|
||||||
|
|||||||
@@ -71,6 +71,8 @@ export interface DeleteOrganizationDialogParams {
|
|||||||
requestType: "InvalidFamiliesForEnterprise" | "RegularDelete";
|
requestType: "InvalidFamiliesForEnterprise" | "RegularDelete";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum DeleteOrganizationDialogResult {
|
export enum DeleteOrganizationDialogResult {
|
||||||
Deleted = "deleted",
|
Deleted = "deleted",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import {
|
|||||||
Permission,
|
Permission,
|
||||||
} from "./access-selector.models";
|
} from "./access-selector.models";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PermissionMode {
|
export enum PermissionMode {
|
||||||
/**
|
/**
|
||||||
* No permission controls or column present. No permission values are emitted.
|
* No permission controls or column present. No permission values are emitted.
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import { GroupView } from "../../../core";
|
|||||||
/**
|
/**
|
||||||
* Permission options that replace/correspond with manage, readOnly, and hidePassword server fields.
|
* Permission options that replace/correspond with manage, readOnly, and hidePassword server fields.
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CollectionPermission {
|
export enum CollectionPermission {
|
||||||
View = "view",
|
View = "view",
|
||||||
ViewExceptPass = "viewExceptPass",
|
ViewExceptPass = "viewExceptPass",
|
||||||
@@ -23,6 +25,8 @@ export enum CollectionPermission {
|
|||||||
Manage = "manage",
|
Manage = "manage",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AccessItemType {
|
export enum AccessItemType {
|
||||||
Collection,
|
Collection,
|
||||||
Group,
|
Group,
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ import {
|
|||||||
} from "../access-selector/access-selector.models";
|
} from "../access-selector/access-selector.models";
|
||||||
import { AccessSelectorModule } from "../access-selector/access-selector.module";
|
import { AccessSelectorModule } from "../access-selector/access-selector.module";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CollectionDialogTabType {
|
export enum CollectionDialogTabType {
|
||||||
Info = 0,
|
Info = 0,
|
||||||
Access = 1,
|
Access = 1,
|
||||||
@@ -76,6 +78,8 @@ export enum CollectionDialogTabType {
|
|||||||
* @readonly
|
* @readonly
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum ButtonType {
|
enum ButtonType {
|
||||||
/** Displayed when the user has reached the maximum number of collections allowed for the organization. */
|
/** Displayed when the user has reached the maximum number of collections allowed for the organization. */
|
||||||
Upgrade = "upgrade",
|
Upgrade = "upgrade",
|
||||||
@@ -103,6 +107,8 @@ export interface CollectionDialogResult {
|
|||||||
collection: CollectionResponse | CollectionView;
|
collection: CollectionResponse | CollectionView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CollectionDialogAction {
|
export enum CollectionDialogAction {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum WebauthnLoginCredentialPrfStatus {
|
export enum WebauthnLoginCredentialPrfStatus {
|
||||||
Enabled = 0,
|
Enabled = 0,
|
||||||
Supported = 1,
|
Supported = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum EmergencyAccessStatusType {
|
export enum EmergencyAccessStatusType {
|
||||||
Invited = 0,
|
Invited = 0,
|
||||||
Accepted = 1,
|
Accepted = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum EmergencyAccessType {
|
export enum EmergencyAccessType {
|
||||||
View = 0,
|
View = 0,
|
||||||
Takeover = 1,
|
Takeover = 1,
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
|||||||
import { DialogConfig, DialogRef, DIALOG_DATA, DialogService } from "@bitwarden/components";
|
import { DialogConfig, DialogRef, DIALOG_DATA, DialogService } from "@bitwarden/components";
|
||||||
import { KeyService } from "@bitwarden/key-management";
|
import { KeyService } from "@bitwarden/key-management";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum EmergencyAccessConfirmDialogResult {
|
export enum EmergencyAccessConfirmDialogResult {
|
||||||
Confirmed = "confirmed",
|
Confirmed = "confirmed",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export type EmergencyAccessAddEditDialogData = {
|
|||||||
readOnly: boolean;
|
readOnly: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum EmergencyAccessAddEditDialogResult {
|
export enum EmergencyAccessAddEditDialogResult {
|
||||||
Saved = "saved",
|
Saved = "saved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import { KdfType, KdfConfigService, KeyService } from "@bitwarden/key-management
|
|||||||
|
|
||||||
import { EmergencyAccessService } from "../../../emergency-access";
|
import { EmergencyAccessService } from "../../../emergency-access";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum EmergencyAccessTakeoverResultType {
|
export enum EmergencyAccessTakeoverResultType {
|
||||||
Done = "done",
|
Done = "done",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ import { PendingWebauthnLoginCredentialView } from "../../../core/views/pending-
|
|||||||
import { CreatePasskeyFailedIcon } from "./create-passkey-failed.icon";
|
import { CreatePasskeyFailedIcon } from "./create-passkey-failed.icon";
|
||||||
import { CreatePasskeyIcon } from "./create-passkey.icon";
|
import { CreatePasskeyIcon } from "./create-passkey.icon";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CreateCredentialDialogResult {
|
export enum CreateCredentialDialogResult {
|
||||||
Success,
|
Success,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,11 +50,15 @@ export interface OrganizationCreatedEvent {
|
|||||||
planDescription: string;
|
planDescription: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum SubscriptionCadence {
|
enum SubscriptionCadence {
|
||||||
Annual,
|
Annual,
|
||||||
Monthly,
|
Monthly,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum SubscriptionProduct {
|
export enum SubscriptionProduct {
|
||||||
PasswordManager,
|
PasswordManager,
|
||||||
SecretsManager,
|
SecretsManager,
|
||||||
|
|||||||
@@ -74,11 +74,15 @@ type ChangePlanDialogParams = {
|
|||||||
productTierType: ProductTierType;
|
productTierType: ProductTierType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ChangePlanDialogResultType {
|
export enum ChangePlanDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PlanCardState {
|
export enum PlanCardState {
|
||||||
Selected = "selected",
|
Selected = "selected",
|
||||||
NotSelected = "not_selected",
|
NotSelected = "not_selected",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-conso
|
|||||||
import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service";
|
import { FileDownloadService } from "@bitwarden/common/platform/abstractions/file-download/file-download.service";
|
||||||
import { DialogConfig, DIALOG_DATA, DialogRef, DialogService } from "@bitwarden/components";
|
import { DialogConfig, DIALOG_DATA, DialogRef, DialogService } from "@bitwarden/components";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum DownloadLicenseDialogResult {
|
export enum DownloadLicenseDialogResult {
|
||||||
Cancelled = "cancelled",
|
Cancelled = "cancelled",
|
||||||
Downloaded = "downloaded",
|
Downloaded = "downloaded",
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import { DialogService, ToastService } from "@bitwarden/components";
|
|||||||
|
|
||||||
import { BillingSyncKeyComponent } from "./billing-sync-key.component";
|
import { BillingSyncKeyComponent } from "./billing-sync-key.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum LicenseOptions {
|
enum LicenseOptions {
|
||||||
SYNC = 0,
|
SYNC = 0,
|
||||||
UPLOAD = 1,
|
UPLOAD = 1,
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ export interface AddCreditDialogData {
|
|||||||
organizationId: string;
|
organizationId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AddCreditDialogResult {
|
export enum AddCreditDialogResult {
|
||||||
Added = "added",
|
Added = "added",
|
||||||
Cancelled = "cancelled",
|
Cancelled = "cancelled",
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ export interface AdjustPaymentDialogParams {
|
|||||||
providerId?: string;
|
providerId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AdjustPaymentDialogResultType {
|
export enum AdjustPaymentDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export interface AdjustStorageDialogParams {
|
|||||||
organizationId?: string;
|
organizationId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AdjustStorageDialogResultType {
|
export enum AdjustStorageDialogResultType {
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ type OrganizationOffboardingParams = {
|
|||||||
|
|
||||||
export type OffboardingSurveyDialogParams = UserOffboardingParams | OrganizationOffboardingParams;
|
export type OffboardingSurveyDialogParams = UserOffboardingParams | OrganizationOffboardingParams;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OffboardingSurveyDialogResultType {
|
export enum OffboardingSurveyDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum UpdateLicenseDialogResult {
|
export enum UpdateLicenseDialogResult {
|
||||||
Updated = "updated",
|
Updated = "updated",
|
||||||
Cancelled = "cancelled",
|
Cancelled = "cancelled",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import { ReportUnsecuredWebsites } from "./icons/report-unsecured-websites.icon"
|
|||||||
import { ReportWeakPasswords } from "./icons/report-weak-passwords.icon";
|
import { ReportWeakPasswords } from "./icons/report-weak-passwords.icon";
|
||||||
import { ReportEntry } from "./shared";
|
import { ReportEntry } from "./shared";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ReportType {
|
export enum ReportType {
|
||||||
ExposedPasswords = "exposedPasswords",
|
ExposedPasswords = "exposedPasswords",
|
||||||
ReusedPasswords = "reusedPasswords",
|
ReusedPasswords = "reusedPasswords",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ReportVariant {
|
export enum ReportVariant {
|
||||||
Enabled = "Enabled",
|
Enabled = "Enabled",
|
||||||
RequiresPremium = "RequiresPremium",
|
RequiresPremium = "RequiresPremium",
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ export interface VaultItemDialogParams {
|
|||||||
restore?: (c: CipherView) => Promise<boolean>;
|
restore?: (c: CipherView) => Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum VaultItemDialogResult {
|
export enum VaultItemDialogResult {
|
||||||
/**
|
/**
|
||||||
* A cipher was saved (created or updated).
|
* A cipher was saved (created or updated).
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ export interface WebVaultGeneratorDialogResult {
|
|||||||
generatedValue?: string;
|
generatedValue?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum WebVaultGeneratorDialogAction {
|
export enum WebVaultGeneratorDialogAction {
|
||||||
Selected = "selected",
|
Selected = "selected",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ import { WebCipherFormGenerationService } from "../services/web-cipher-form-gene
|
|||||||
/**
|
/**
|
||||||
* The result of the AddEditCipherDialogV2 component.
|
* The result of the AddEditCipherDialogV2 component.
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AddEditCipherDialogResult {
|
export enum AddEditCipherDialogResult {
|
||||||
Edited = "edited",
|
Edited = "edited",
|
||||||
Added = "added",
|
Added = "added",
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export interface BulkDeleteDialogParams {
|
|||||||
unassignedCiphers?: string[];
|
unassignedCiphers?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BulkDeleteDialogResult {
|
export enum BulkDeleteDialogResult {
|
||||||
Deleted = "deleted",
|
Deleted = "deleted",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ export interface BulkMoveDialogParams {
|
|||||||
cipherIds?: string[];
|
cipherIds?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BulkMoveDialogResult {
|
export enum BulkMoveDialogResult {
|
||||||
Moved = "moved",
|
Moved = "moved",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ export interface FolderAddEditDialogParams {
|
|||||||
folderId: string;
|
folderId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum FolderAddEditDialogResult {
|
export enum FolderAddEditDialogResult {
|
||||||
Deleted = "deleted",
|
Deleted = "deleted",
|
||||||
Canceled = "canceled",
|
Canceled = "canceled",
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import { UserId } from "@bitwarden/common/types/guid";
|
|||||||
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||||
import { PBKDF2KdfConfig, KdfConfigService, KdfType } from "@bitwarden/key-management";
|
import { PBKDF2KdfConfig, KdfConfigService, KdfType } from "@bitwarden/key-management";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum VisibleVaultBanner {
|
export enum VisibleVaultBanner {
|
||||||
KDFSettings = "kdf-settings",
|
KDFSettings = "kdf-settings",
|
||||||
OutdatedBrowser = "outdated-browser",
|
OutdatedBrowser = "outdated-browser",
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ export type VaultFilterType =
|
|||||||
| FolderFilter
|
| FolderFilter
|
||||||
| CollectionFilter;
|
| CollectionFilter;
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum VaultFilterLabel {
|
export enum VaultFilterLabel {
|
||||||
OrganizationFilter = "organizationFilter",
|
OrganizationFilter = "organizationFilter",
|
||||||
TypeFilter = "typeFilter",
|
TypeFilter = "typeFilter",
|
||||||
|
|||||||
@@ -54,6 +54,8 @@ export interface ViewCipherDialogParams {
|
|||||||
disableEdit?: boolean;
|
disableEdit?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ViewCipherDialogResult {
|
export enum ViewCipherDialogResult {
|
||||||
Edited = "edited",
|
Edited = "edited",
|
||||||
Deleted = "deleted",
|
Deleted = "deleted",
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
|
|||||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||||
import { VaultMessages } from "@bitwarden/common/vault/enums/vault-messages.enum";
|
import { VaultMessages } from "@bitwarden/common/vault/enums/vault-messages.enum";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BrowserPromptState {
|
export enum BrowserPromptState {
|
||||||
Loading = "loading",
|
Loading = "loading",
|
||||||
Error = "error",
|
Error = "error",
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ export interface PasswordHealthReportApplicationsRequest {
|
|||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum DrawerType {
|
export enum DrawerType {
|
||||||
None = 0,
|
None = 0,
|
||||||
AppAtRiskMembers = 1,
|
AppAtRiskMembers = 1,
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export type AddEditMemberDialogParams = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AddEditMemberDialogResultType {
|
export enum AddEditMemberDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Deleted = "deleted",
|
Deleted = "deleted",
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export type AddExistingOrganizationDialogParams = {
|
|||||||
provider: Provider;
|
provider: Provider;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AddExistingOrganizationDialogResultType {
|
export enum AddExistingOrganizationDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ type CreateClientDialogParams = {
|
|||||||
plans: PlanResponse[];
|
plans: PlanResponse[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum CreateClientDialogResultType {
|
export enum CreateClientDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ type ManageClientNameDialogParams = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ManageClientNameDialogResultType {
|
export enum ManageClientNameDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ type ManageClientSubscriptionDialogParams = {
|
|||||||
provider: Provider;
|
provider: Provider;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ManageClientSubscriptionDialogResultType {
|
export enum ManageClientSubscriptionDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ import { PasswordHealthMembersURIComponent } from "./password-health-members-uri
|
|||||||
import { PasswordHealthMembersComponent } from "./password-health-members.component";
|
import { PasswordHealthMembersComponent } from "./password-health-members.component";
|
||||||
import { PasswordHealthComponent } from "./password-health.component";
|
import { PasswordHealthComponent } from "./password-health.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum RiskInsightsTabType {
|
export enum RiskInsightsTabType {
|
||||||
AllApps = 0,
|
AllApps = 0,
|
||||||
CriticalApps = 1,
|
CriticalApps = 1,
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/
|
|||||||
import { ProjectView } from "../../models/view/project.view";
|
import { ProjectView } from "../../models/view/project.view";
|
||||||
import { ProjectService } from "../../projects/project.service";
|
import { ProjectService } from "../../projects/project.service";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OperationType {
|
export enum OperationType {
|
||||||
Add,
|
Add,
|
||||||
Edit,
|
Edit,
|
||||||
|
|||||||
@@ -44,11 +44,15 @@ import { SecretService } from "../secret.service";
|
|||||||
|
|
||||||
import { SecretDeleteDialogComponent, SecretDeleteOperation } from "./secret-delete.component";
|
import { SecretDeleteDialogComponent, SecretDeleteOperation } from "./secret-delete.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OperationType {
|
export enum OperationType {
|
||||||
Add,
|
Add,
|
||||||
Edit,
|
Edit,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum SecretDialogTabType {
|
export enum SecretDialogTabType {
|
||||||
NameValuePair = 0,
|
NameValuePair = 0,
|
||||||
People = 1,
|
People = 1,
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/
|
|||||||
import { ServiceAccountView } from "../../models/view/service-account.view";
|
import { ServiceAccountView } from "../../models/view/service-account.view";
|
||||||
import { ServiceAccountService } from "../service-account.service";
|
import { ServiceAccountService } from "../service-account.service";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OperationType {
|
export enum OperationType {
|
||||||
Add,
|
Add,
|
||||||
Edit,
|
Edit,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ApItemEnum {
|
export enum ApItemEnum {
|
||||||
User,
|
User,
|
||||||
Group,
|
Group,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ApPermissionEnum {
|
export enum ApPermissionEnum {
|
||||||
CanRead = "canRead",
|
CanRead = "canRead",
|
||||||
CanReadWrite = "canReadWrite",
|
CanReadWrite = "canReadWrite",
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ export interface BulkConfirmationStatus {
|
|||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BulkConfirmationResult {
|
export enum BulkConfirmationResult {
|
||||||
Continue,
|
Continue,
|
||||||
Cancel,
|
Cancel,
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export default tseslint.config(
|
|||||||
"@angular-eslint/use-lifecycle-interface": "error",
|
"@angular-eslint/use-lifecycle-interface": "error",
|
||||||
"@angular-eslint/use-pipe-transform-interface": 0,
|
"@angular-eslint/use-pipe-transform-interface": 0,
|
||||||
"@bitwarden/platform/required-using": "error",
|
"@bitwarden/platform/required-using": "error",
|
||||||
|
"@bitwarden/platform/no-enums": "error",
|
||||||
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "no-public" }],
|
"@typescript-eslint/explicit-member-accessibility": ["error", { accessibility: "no-public" }],
|
||||||
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
|
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
|
||||||
"@typescript-eslint/no-floating-promises": "error",
|
"@typescript-eslint/no-floating-promises": "error",
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export type AddAccountCreditDialogParams = {
|
|||||||
providerId?: string;
|
providerId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AddAccountCreditDialogResultType {
|
export enum AddAccountCreditDialogResultType {
|
||||||
Closed = "closed",
|
Closed = "closed",
|
||||||
Submitted = "submitted",
|
Submitted = "submitted",
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import { SendService } from "@bitwarden/common/tools/send/services/send.service.
|
|||||||
import { DialogService, ToastService } from "@bitwarden/components";
|
import { DialogService, ToastService } from "@bitwarden/components";
|
||||||
|
|
||||||
// Value = hours
|
// Value = hours
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum DatePreset {
|
enum DatePreset {
|
||||||
OneHour = 1,
|
OneHour = 1,
|
||||||
OneDay = 24,
|
OneDay = 24,
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import { PasswordInputResult } from "./password-input-result";
|
|||||||
/**
|
/**
|
||||||
* Determines which form input elements will be displayed in the UI.
|
* Determines which form input elements will be displayed in the UI.
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum InputPasswordFlow {
|
export enum InputPasswordFlow {
|
||||||
/**
|
/**
|
||||||
* - Input: New password
|
* - Input: New password
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ import { AnonLayoutWrapperDataService } from "../anon-layout/anon-layout-wrapper
|
|||||||
|
|
||||||
import { LoginDecryptionOptionsService } from "./login-decryption-options.service";
|
import { LoginDecryptionOptionsService } from "./login-decryption-options.service";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum State {
|
enum State {
|
||||||
NewUser,
|
NewUser,
|
||||||
ExistingUserUntrustedDevice,
|
ExistingUserUntrustedDevice,
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ import { PasswordGenerationServiceAbstraction } from "@bitwarden/generator-legac
|
|||||||
import { AuthRequestApiService } from "../../common/abstractions/auth-request-api.service";
|
import { AuthRequestApiService } from "../../common/abstractions/auth-request-api.service";
|
||||||
import { LoginViaAuthRequestCacheService } from "../../common/services/auth-request/default-login-via-auth-request-cache.service";
|
import { LoginViaAuthRequestCacheService } from "../../common/services/auth-request/default-login-via-auth-request-cache.service";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
enum Flow {
|
enum Flow {
|
||||||
StandardAuthRequest, // when user clicks "Login with device" from /login or "Approve from your other device" from /login-initiated
|
StandardAuthRequest, // when user clicks "Login with device" from /login or "Approve from your other device" from /login-initiated
|
||||||
AdminAuthRequest, // when user clicks "Request admin approval" from /login-initiated
|
AdminAuthRequest, // when user clicks "Request admin approval" from /login-initiated
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ import { LoginComponentService, PasswordPolicies } from "./login-component.servi
|
|||||||
|
|
||||||
const BroadcasterSubscriptionId = "LoginComponent";
|
const BroadcasterSubscriptionId = "LoginComponent";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum LoginUiState {
|
export enum LoginUiState {
|
||||||
EMAIL_ENTRY = "EmailEntry",
|
EMAIL_ENTRY = "EmailEntry",
|
||||||
MASTER_PASSWORD_ENTRY = "MasterPasswordEntry",
|
MASTER_PASSWORD_ENTRY = "MasterPasswordEntry",
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import { RegistrationUserAddIcon } from "../../icons";
|
|||||||
import { RegistrationCheckEmailIcon } from "../../icons/registration-check-email.icon";
|
import { RegistrationCheckEmailIcon } from "../../icons/registration-check-email.icon";
|
||||||
import { RegistrationEnvSelectorComponent } from "../registration-env-selector/registration-env-selector.component";
|
import { RegistrationEnvSelectorComponent } from "../registration-env-selector/registration-env-selector.component";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum RegistrationStartState {
|
export enum RegistrationStartState {
|
||||||
USER_DATA_ENTRY = "UserDataEntry",
|
USER_DATA_ENTRY = "UserDataEntry",
|
||||||
CHECK_EMAIL = "CheckEmail",
|
CHECK_EMAIL = "CheckEmail",
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum LegacyKeyMigrationAction {
|
export enum LegacyKeyMigrationAction {
|
||||||
PREVENT_LOGIN_AND_SHOW_REQUIRE_MIGRATION_WARNING,
|
PREVENT_LOGIN_AND_SHOW_REQUIRE_MIGRATION_WARNING,
|
||||||
NAVIGATE_TO_MIGRATION_COMPONENT,
|
NAVIGATE_TO_MIGRATION_COMPONENT,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum DuoLaunchAction {
|
export enum DuoLaunchAction {
|
||||||
DIRECT_LAUNCH,
|
DIRECT_LAUNCH,
|
||||||
SINGLE_ACTION_POPOUT,
|
SINGLE_ACTION_POPOUT,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ActiveClientVerificationOption {
|
export enum ActiveClientVerificationOption {
|
||||||
MasterPassword = "masterPassword",
|
MasterPassword = "masterPassword",
|
||||||
Pin = "pin",
|
Pin = "pin",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from "@angular/forms";
|
import { AbstractControl, FormGroup, ValidationErrors, ValidatorFn } from "@angular/forms";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ValidationGoal {
|
export enum ValidationGoal {
|
||||||
InputsShouldMatch,
|
InputsShouldMatch,
|
||||||
InputsShouldNotMatch,
|
InputsShouldNotMatch,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OrganizationApiKeyType {
|
export enum OrganizationApiKeyType {
|
||||||
Default = 0,
|
Default = 0,
|
||||||
BillingSync = 1,
|
BillingSync = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OrganizationConnectionType {
|
export enum OrganizationConnectionType {
|
||||||
CloudBillingSync = 1,
|
CloudBillingSync = 1,
|
||||||
Scim = 2,
|
Scim = 2,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OrganizationUserStatusType {
|
export enum OrganizationUserStatusType {
|
||||||
Invited = 0,
|
Invited = 0,
|
||||||
Accepted = 1,
|
Accepted = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OrganizationUserType {
|
export enum OrganizationUserType {
|
||||||
Owner = 0,
|
Owner = 0,
|
||||||
Admin = 1,
|
Admin = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PolicyType {
|
export enum PolicyType {
|
||||||
TwoFactorAuthentication = 0, // Requires users to have 2fa enabled
|
TwoFactorAuthentication = 0, // Requires users to have 2fa enabled
|
||||||
MasterPassword = 1, // Sets minimum requirements for master password complexity
|
MasterPassword = 1, // Sets minimum requirements for master password complexity
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProviderStatusType {
|
export enum ProviderStatusType {
|
||||||
Pending = 0,
|
Pending = 0,
|
||||||
Created = 1,
|
Created = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProviderType {
|
export enum ProviderType {
|
||||||
Msp = 0,
|
Msp = 0,
|
||||||
Reseller = 1,
|
Reseller = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProviderUserStatusType {
|
export enum ProviderUserStatusType {
|
||||||
Invited = 0,
|
Invited = 0,
|
||||||
Accepted = 1,
|
Accepted = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProviderUserType {
|
export enum ProviderUserType {
|
||||||
ProviderAdmin = 0,
|
ProviderAdmin = 0,
|
||||||
ServiceUser = 1,
|
ServiceUser = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ScimProviderType {
|
export enum ScimProviderType {
|
||||||
Default = 0,
|
Default = 0,
|
||||||
AzureAd = 1,
|
AzureAd = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AuthRequestType {
|
export enum AuthRequestType {
|
||||||
AuthenticateAndUnlock = 0,
|
AuthenticateAndUnlock = 0,
|
||||||
Unlock = 1,
|
Unlock = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AuthenticationStatus {
|
export enum AuthenticationStatus {
|
||||||
LoggedOut = 0,
|
LoggedOut = 0,
|
||||||
Locked = 1,
|
Locked = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum AuthenticationType {
|
export enum AuthenticationType {
|
||||||
Password = 0,
|
Password = 0,
|
||||||
Sso = 1,
|
Sso = 1,
|
||||||
|
|||||||
@@ -1,25 +1,35 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum SsoType {
|
export enum SsoType {
|
||||||
None = 0,
|
None = 0,
|
||||||
OpenIdConnect = 1,
|
OpenIdConnect = 1,
|
||||||
Saml2 = 2,
|
Saml2 = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum MemberDecryptionType {
|
export enum MemberDecryptionType {
|
||||||
MasterPassword = 0,
|
MasterPassword = 0,
|
||||||
KeyConnector = 1,
|
KeyConnector = 1,
|
||||||
TrustedDeviceEncryption = 2,
|
TrustedDeviceEncryption = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum OpenIdConnectRedirectBehavior {
|
export enum OpenIdConnectRedirectBehavior {
|
||||||
RedirectGet = 0,
|
RedirectGet = 0,
|
||||||
FormPost = 1,
|
FormPost = 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum Saml2BindingType {
|
export enum Saml2BindingType {
|
||||||
HttpRedirect = 1,
|
HttpRedirect = 1,
|
||||||
HttpPost = 2,
|
HttpPost = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum Saml2NameIdFormat {
|
export enum Saml2NameIdFormat {
|
||||||
NotConfigured = 0,
|
NotConfigured = 0,
|
||||||
Unspecified = 1,
|
Unspecified = 1,
|
||||||
@@ -32,6 +42,8 @@ export enum Saml2NameIdFormat {
|
|||||||
Transient = 8,
|
Transient = 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum Saml2SigningBehavior {
|
export enum Saml2SigningBehavior {
|
||||||
IfIdpWantAuthnRequestsSigned = 0,
|
IfIdpWantAuthnRequestsSigned = 0,
|
||||||
Always = 1,
|
Always = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum TwoFactorProviderType {
|
export enum TwoFactorProviderType {
|
||||||
Authenticator = 0,
|
Authenticator = 0,
|
||||||
Email = 1,
|
Email = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum VerificationType {
|
export enum VerificationType {
|
||||||
MasterPassword = 0,
|
MasterPassword = 0,
|
||||||
OTP = 1,
|
OTP = 1,
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
* This enum is used to determine if a user should be forced to initially set or reset their password
|
* This enum is used to determine if a user should be forced to initially set or reset their password
|
||||||
* on login (server flag) or unlock via MP (client evaluation).
|
* on login (server flag) or unlock via MP (client evaluation).
|
||||||
*/
|
*/
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ForceSetPasswordReason {
|
export enum ForceSetPasswordReason {
|
||||||
/**
|
/**
|
||||||
* A password reset should not be forced.
|
* A password reset should not be forced.
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ import {
|
|||||||
SECURITY_STAMP_MEMORY,
|
SECURITY_STAMP_MEMORY,
|
||||||
} from "./token.state";
|
} from "./token.state";
|
||||||
|
|
||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum TokenStorageLocation {
|
export enum TokenStorageLocation {
|
||||||
Disk = "disk",
|
Disk = "disk",
|
||||||
SecureStorage = "secureStorage",
|
SecureStorage = "secureStorage",
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum BitwardenProductType {
|
export enum BitwardenProductType {
|
||||||
PasswordManager = 0,
|
PasswordManager = 0,
|
||||||
SecretsManager = 1,
|
SecretsManager = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PaymentMethodType {
|
export enum PaymentMethodType {
|
||||||
Card = 0,
|
Card = 0,
|
||||||
BankAccount = 1,
|
BankAccount = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PlanInterval {
|
export enum PlanInterval {
|
||||||
Monthly = 0,
|
Monthly = 0,
|
||||||
Annually = 1,
|
Annually = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PlanSponsorshipType {
|
export enum PlanSponsorshipType {
|
||||||
FamiliesForEnterprise = 0,
|
FamiliesForEnterprise = 0,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum PlanType {
|
export enum PlanType {
|
||||||
Free = 0,
|
Free = 0,
|
||||||
FamiliesAnnually2019 = 1,
|
FamiliesAnnually2019 = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProductTierType {
|
export enum ProductTierType {
|
||||||
Free = 0,
|
Free = 0,
|
||||||
Families = 1,
|
Families = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ProductType {
|
export enum ProductType {
|
||||||
PasswordManager = 0,
|
PasswordManager = 0,
|
||||||
SecretsManager = 1,
|
SecretsManager = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum TransactionType {
|
export enum TransactionType {
|
||||||
Charge = 0,
|
Charge = 0,
|
||||||
Credit = 1,
|
Credit = 1,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: update to use a const object instead of a typescript enum
|
||||||
|
// eslint-disable-next-line @bitwarden/platform/no-enums
|
||||||
export enum ClientType {
|
export enum ClientType {
|
||||||
Web = "web",
|
Web = "web",
|
||||||
Browser = "browser",
|
Browser = "browser",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user