mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 11:13:46 +00:00
[PS-2108] Enpass importer add support for androidurl's (#4314)
* Move and rename importers ater new naming convention Create a subfolder to hold all enpass-importers Change names to new naming convention Fix imports Remove entries from whitelist * Added types for exported enpass json file * Add unit tests to verify for current behaviour * Prefer types over enums * Replace `any` types with defined Enpass types * Add support for parsing Android urls Fixes #2831 Added test-file with several combinations Wrote test cases to verify
This commit is contained in:
committed by
GitHub
parent
3976271d61
commit
ae3edcc34d
130
libs/common/spec/importers/enpass/test-data/json/login.ts
Normal file
130
libs/common/spec/importers/enpass/test-data/json/login.ts
Normal file
@@ -0,0 +1,130 @@
|
||||
import { EnpassJsonFile } from "@bitwarden/common/importers/enpass/types/enpass-json-type";
|
||||
|
||||
export const login: EnpassJsonFile = {
|
||||
folders: [],
|
||||
items: [
|
||||
{
|
||||
archived: 0,
|
||||
auto_submit: 1,
|
||||
category: "login",
|
||||
createdAt: 1666449561,
|
||||
favorite: 1,
|
||||
fields: [
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Username",
|
||||
order: 1,
|
||||
sensitive: 0,
|
||||
type: "username",
|
||||
uid: 10,
|
||||
updated_at: 1666449561,
|
||||
value: "",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "E-mail",
|
||||
order: 2,
|
||||
sensitive: 0,
|
||||
type: "email",
|
||||
uid: 12,
|
||||
updated_at: 1666449561,
|
||||
value: "emily@enpass.io",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Password",
|
||||
order: 3,
|
||||
sensitive: 1,
|
||||
type: "password",
|
||||
uid: 11,
|
||||
updated_at: 1666449561,
|
||||
value: "$&W:v@}4\\iRpUXVbjPdPKDGbD<xK>",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Website",
|
||||
order: 4,
|
||||
sensitive: 0,
|
||||
type: "url",
|
||||
uid: 13,
|
||||
updated_at: 1666449561,
|
||||
value: "https://www.amazon.com",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "ADDITIONAL DETAILS",
|
||||
order: 5,
|
||||
sensitive: 0,
|
||||
type: "section",
|
||||
uid: 101,
|
||||
updated_at: 1666449561,
|
||||
value: "",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Phone number",
|
||||
order: 6,
|
||||
sensitive: 0,
|
||||
type: "phone",
|
||||
uid: 14,
|
||||
updated_at: 1666449561,
|
||||
value: "12345678",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "TOTP",
|
||||
order: 7,
|
||||
sensitive: 0,
|
||||
type: "totp",
|
||||
uid: 102,
|
||||
updated_at: 1666449561,
|
||||
value: "TOTP_SEED_VALUE",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Security question",
|
||||
order: 8,
|
||||
sensitive: 0,
|
||||
type: "text",
|
||||
uid: 15,
|
||||
updated_at: 1666449561,
|
||||
value: "SECURITY_QUESTION",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
{
|
||||
deleted: 0,
|
||||
label: "Security answer",
|
||||
order: 9,
|
||||
sensitive: 1,
|
||||
type: "text",
|
||||
uid: 16,
|
||||
updated_at: 1666449561,
|
||||
value: "SECURITY_ANSWER",
|
||||
value_updated_at: 1666449561,
|
||||
},
|
||||
],
|
||||
icon: {
|
||||
fav: "www.amazon.com",
|
||||
image: {
|
||||
file: "web/amazon.com",
|
||||
},
|
||||
type: 1,
|
||||
uuid: "",
|
||||
},
|
||||
note: "some notes on the login item",
|
||||
subtitle: "emily@enpass.io",
|
||||
template_type: "login.default",
|
||||
title: "Amazon",
|
||||
trashed: 0,
|
||||
updated_at: 1666449561,
|
||||
uuid: "f717cb7c-6cce-4b24-b023-ec8a429cc992",
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user