1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-11 10:10:25 +01:00
bitwarden-browser/spec/common/importers/testData/onePassword1Pux/Passport.ts
Daniel James Smith 8e112a1c33
Add importer for 1Password's new export format (.1pux) (#594)
* Initial commit

* Refactor the 1pux types

* Add test data

* 1Pux importer and tests

* Fixed a typo in the 1Pux types

* Make the linter happy

* Register and instantiate importer

* Fix adding secure notes

* Add missing placeholder property to types

* Test for existance of TOTP seed

* Add more test data

* Move processFullName into BaseImporter

* Add categoryEnum for easier mapping

* Refactoring of the importer and add support for different item types

* Make linter happy

* Modified some test data

* Fix linting issues

* Remove fieldvalue references comment

* Remove commented mapping use during tests
2022-03-03 15:22:05 +01:00

237 lines
8.8 KiB
TypeScript

import { ExportData } from "jslib-common/importers/onepasswordImporters/types/onepassword1PuxImporterTypes";
export const PassportData: ExportData = {
accounts: [
{
attrs: {
accountName: "1Password Customer",
name: "1Password Customer",
avatar: "",
email: "username123123123@gmail.com",
uuid: "TRIZ3XV4JJFRXJ3BARILLTUA6E",
domain: "https://my.1password.com/",
},
vaults: [
{
attrs: {
uuid: "pqcgbqjxr4tng2hsqt5ffrgwju",
desc: "Just test entries",
avatar: "ke7i5rxnjrh3tj6uesstcosspu.png",
name: "T's Test Vault",
type: "U",
},
items: [
{
item: {
uuid: "hffila4ew2e3krfzp2tkdkdmea",
favIndex: 0,
createdAt: 1619467498,
updatedAt: 1619467655,
trashed: false,
categoryUuid: "106",
details: {
loginFields: [],
notesPlain: "My Passport",
sections: [
{
title: "",
fields: [
{
title: "type",
id: "type",
value: {
string: "US Passport",
},
indexAtSource: 0,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "allCharacters",
},
},
{
title: "issuing country",
id: "issuing_country",
value: {
string: "United States of America",
},
indexAtSource: 1,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "number",
id: "number",
value: {
string: "76436847",
},
indexAtSource: 2,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "namePhonePad",
correction: "default",
capitalization: "default",
},
},
{
title: "full name",
id: "fullname",
value: {
string: "David Global",
},
indexAtSource: 3,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "sex",
id: "sex",
value: {
gender: "female",
},
indexAtSource: 4,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "nationality",
id: "nationality",
value: {
string: "International",
},
indexAtSource: 5,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "issuing authority",
id: "issuing_authority",
value: {
string: "Department of State",
},
indexAtSource: 6,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "date of birth",
id: "birthdate",
value: {
date: 418046460,
},
indexAtSource: 7,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "place of birth",
id: "birthplace",
value: {
string: "A cave somewhere in Maine",
},
indexAtSource: 8,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "words",
},
},
{
title: "issued on",
id: "issue_date",
value: {
date: 1577880060,
},
indexAtSource: 9,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
{
title: "expiry date",
id: "expiry_date",
value: {
date: 2524651260,
},
indexAtSource: 10,
guarded: false,
multiline: false,
dontGenerate: false,
inputTraits: {
keyboard: "default",
correction: "default",
capitalization: "default",
},
},
],
},
],
passwordHistory: [],
},
overview: {
subtitle: "76436847",
tags: ["Travel"],
title: "Mr. Globewide",
url: "",
ps: 0,
pbe: 0.0,
pgrng: false,
},
},
},
],
},
],
},
],
};