1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +00:00

[PM-11437] 1Password 1pux importer updates and fixes (#10778)

* Replaced field trashed with state

The new field state contains either 'active' or 'archived'

Adjust all the test files to have the new field

Add unit test to verify skipping archived items on import

Fix importer

* Add addtional fields to 1pux importer types

No mapping currently necessary

* Field indexAtSource was deprecated

Removing it from the 1pux-importer-types

Updating all the test files

* Removed remaining instances of indexAtSource

* Fixed a leftover instance of trashed -> state

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
Daniel James Smith
2024-10-07 19:12:12 +02:00
committed by GitHub
parent 7e4d735532
commit e47415fe91
27 changed files with 66 additions and 446 deletions

View File

@@ -37,7 +37,7 @@ export class OnePassword1PuxImporter extends BaseImporter implements Importer {
// const personalVaults = account.vaults[0].filter((v) => v.attrs.type === VaultAttributeTypeEnum.Personal);
account.vaults.forEach((vault: VaultsEntity) => {
vault.items.forEach((item: Item) => {
if (item.trashed === true) {
if (item.state === "archived") {
return;
}

View File

@@ -53,7 +53,7 @@ export interface Item {
favIndex: number;
createdAt: number;
updatedAt: number;
trashed?: boolean;
state: "active" | "archived";
categoryUuid: string;
details: Details;
overview: Overview;
@@ -88,12 +88,12 @@ export interface SectionsEntity {
title: string;
name?: string | null;
fields?: FieldsEntity[] | null;
hideAddAnotherField?: boolean | null;
}
export interface FieldsEntity {
title: string;
id: string;
value: Value;
indexAtSource: number;
guarded: boolean;
multiline: boolean;
dontGenerate: boolean;
@@ -153,6 +153,8 @@ export interface Overview {
pbe?: number | null;
pgrng?: boolean | null;
tags?: string[] | null;
icons?: string | null;
watchtowerExclusions?: string | null;
}
export interface UrlsEntity {
label: string;