Expand description
Generic submit pipeline shared by all SDK importers.
A format-specific parser (see crate::importers) produces a ParsedImport; this module
encrypts it for the destination, builds the API request, submits it, and reports the counts.
Nothing here is format-specific.
StructsΒ§
- Parsed
Import - Format-agnostic parse result: the ciphers, the folder paths, and which cipher belongs to which folder (by index). Every importer parser produces this for the pipeline to submit.
EnumsΒ§
- Import
Payload π - The encrypted request model and counts for an import, ready to submit.
FunctionsΒ§
- build_
org_ πcollections - Builds the collection views for an org import, plus the count of collections actually parsed
from the source (excluding the injected target) β mirrors
build_personal_folders, but for collections. When a target is given it becomes collection 0 and parsed groups are nested beneath it as"{target}/{group}"; with no target, every group becomes a brand-new top-level collection (submitted with no id, same asbuild_personal_folderssubmits new folders with no id β the server creates on an unmatched/empty id). - build_
personal_ πfolders - Builds the folder views to import, plus the count of folders actually parsed from the source
(excluding the injected target). When a target folder is given it becomes folder 0 and the
imported groups are nested beneath it as
"{target}/{group}"β the returned count is alwaysnames.len(), regardless of whether a target was given, so callers canβt accidentally report the merged listβs length (which includes the pre-existing target) as an import count. - count_
by_ πtype - Counts ciphers by vault type, in a stable display order, omitting types with no entries.
- filter_
restricted π - Drops ciphers whose type is restricted and re-indexes the folder relationships.
- nest_
relationships_ πunder_ target - Shifts existing relationships to account for the target folder at index 0 and assigns any folder-less cipher to it.
- submit_
import π - Encrypts a parsed import for the destination (personal vault or organization), submits it to the import endpoint, and returns the per-type counts.
- targets_
my_ πitems - True when the org-import target is the userβs own βMy itemsβ collection
- to_kvp π
- vault_
cipher_ πtype - Maps an exporter [
CipherType] to the vault [bitwarden_vault::CipherType] discriminant.