Skip to content

FIX #54: update models from vaultwarden 1.37.2 api response - #55

Open
nipil wants to merge 1 commit into
numberly:mainfrom
nipil:fix_missing_models_and_fields
Open

nipil wants to merge 1 commit into
numberly:mainfrom
nipil:fix_missing_models_and_fields

Conversation

@nipil

@nipil nipil commented Oct 18, 2026

Copy link
Copy Markdown

Proposed fix for #54 : updated pydantic models

  • Identity / IdentityData
  • CipherType.SshKey / SshKeyCipher
  • SshKeyData
  • _CipherBase
    • add bankAccount
    • add driversLicense
    • add passport
    • fix sshKey type

Patch above was derived from the following summary, extracted from actual API responses against my 1.37.2 server

=== Cipher type 1 (47 unique keys) ===
attachments                   ['NoneType',  'list']
bankAccount                   ['NoneType']
card                          ['NoneType']
collectionIds                 ['list']
creationDate                  ['str']
deletedDate                   ['NoneType',  'str']
driversLicense                ['NoneType']
fields                        ['list']
id                            ['str']
identity                      ['NoneType']
key                           ['NoneType']
login                         ['dict']
name                          ['str']
notes                         ['NoneType',  'str']
object                        ['str']
organizationId                ['str']
organizationUseTotp           ['bool']
passport                      ['NoneType']
passwordHistory               ['list']
reprompt                      ['int']
revisionDate                  ['str']
secureNote                    ['NoneType']
sshKey                        ['NoneType']
type                          ['int']
attachments.fileName          ['str']
attachments.id                ['str']
attachments.key               ['str']
attachments.object            ['str']
attachments.size              ['str']
attachments.sizeName          ['str']
attachments.url               ['str']
fields.name                   ['str']
fields.type                   ['int']
fields.value                  ['str']
login.autofillOnPageLoad      ['NoneType']
login.fido2Credentials        ['list']
login.password                ['NoneType',  'str']
login.passwordRevisionDate    ['NoneType',  'str']
login.totp                    ->            values:  ['NoneType',  'str']
login.uri                     ['NoneType',  'str']
login.uris                    ['list']
login.username                ['NoneType',  'str']
passwordHistory.lastUsedDate  ['str']
passwordHistory.password      ['str']
login.uris.match              ['NoneType',  'int']
login.uris.uri                ['str']
login.uris.uriChecksum        ['str']

=== Cipher type 5 (27 unique keys) ===
attachments                   ['NoneType']
bankAccount                   ['NoneType']
card                          ['NoneType']
collectionIds                 ['list']
creationDate                  ['str']
deletedDate                   ['NoneType',  'str']
driversLicense                ['NoneType']
fields                        ['list']
id                            ['str']
identity                      ['NoneType']
key                           ['NoneType']
login                         ['NoneType']
name                          ['str']
notes                         ['NoneType']
object                        ['str']
organizationId                ['str']
organizationUseTotp           ['bool']
passport                      ['NoneType']
passwordHistory               ['list']
reprompt                      ['int']
revisionDate                  ['str']
secureNote                    ['NoneType']
sshKey                        ['dict']
type                          ['int']
sshKey.keyFingerprint         ['str']
sshKey.privateKey             ['str']
sshKey.publicKey              ['str']

PS: I am very new to vaultwarden and python-vaultwarden, so i have no clue if these fields are actually specified, as i did not find any documentation nor specification about the Bitwarden Client API... sadly.

What is included:
- Identity / IdentityData
- CipherType.SshKey / SshKeyCipher
- SshKeyData
- _CipherBase
  - add bankAccount
  - add driversLicense
  - add passport
  - fix sshKey type

Patch derived from the following cipher summary

=== Cipher type 1 (47 unique keys) ===
attachments -> values: ['NoneType', 'list']
bankAccount -> values: ['NoneType']
card -> values: ['NoneType']
collectionIds -> values: ['list']
creationDate -> values: ['str']
deletedDate -> values: ['NoneType', 'str']
driversLicense -> values: ['NoneType']
fields -> values: ['list']
id -> values: ['str']
identity -> values: ['NoneType']
key -> values: ['NoneType']
login -> values: ['dict']
name -> values: ['str']
notes -> values: ['NoneType', 'str']
object -> values: ['str']
organizationId -> values: ['str']
organizationUseTotp -> values: ['bool']
passport -> values: ['NoneType']
passwordHistory -> values: ['list']
reprompt -> values: ['int']
revisionDate -> values: ['str']
secureNote -> values: ['NoneType']
sshKey -> values: ['NoneType']
type -> values: ['int']
attachments.fileName -> values: ['str']
attachments.id -> values: ['str']
attachments.key -> values: ['str']
attachments.object -> values: ['str']
attachments.size -> values: ['str']
attachments.sizeName -> values: ['str']
attachments.url -> values: ['str']
fields.name -> values: ['str']
fields.type -> values: ['int']
fields.value -> values: ['str']
login.autofillOnPageLoad -> values: ['NoneType']
login.fido2Credentials -> values: ['list']
login.password -> values: ['NoneType', 'str']
login.passwordRevisionDate -> values: ['NoneType', 'str']
login.totp -> values: ['NoneType', 'str']
login.uri -> values: ['NoneType', 'str']
login.uris -> values: ['list']
login.username -> values: ['NoneType', 'str']
passwordHistory.lastUsedDate -> values: ['str']
passwordHistory.password -> values: ['str']
login.uris.match -> values: ['NoneType', 'int']
login.uris.uri -> values: ['str']
login.uris.uriChecksum -> values: ['str']

=== Cipher type 5 (27 unique keys) ===
attachments -> values: ['NoneType']
bankAccount -> values: ['NoneType']
card -> values: ['NoneType']
collectionIds -> values: ['list']
creationDate -> values: ['str']
deletedDate -> values: ['NoneType', 'str']
driversLicense -> values: ['NoneType']
fields -> values: ['list']
id -> values: ['str']
identity -> values: ['NoneType']
key -> values: ['NoneType']
login -> values: ['NoneType']
name -> values: ['str']
notes -> values: ['NoneType']
object -> values: ['str']
organizationId -> values: ['str']
organizationUseTotp -> values: ['bool']
passport -> values: ['NoneType']
passwordHistory -> values: ['list']
reprompt -> values: ['int']
revisionDate -> values: ['str']
secureNote -> values: ['NoneType']
sshKey -> values: ['dict']
type -> values: ['int']
sshKey.keyFingerprint -> values: ['str']
sshKey.privateKey -> values: ['str']
sshKey.publicKey -> values: ['str']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant