@@ -383,6 +383,17 @@ jsonEncCipher_LoginCipher_password_Maybe val = (maybeEncode (Json.Encode.string
383383
384384
385385
386+type alias Cipher_LoginCipher_totp_Maybe = (Maybe String)
387+
388+jsonDecCipher_LoginCipher_totp_Maybe : Json.Decode.Decoder ( Cipher_LoginCipher_totp_Maybe )
389+jsonDecCipher_LoginCipher_totp_Maybe =
390+ Json.Decode.maybe (Json.Decode.string)
391+
392+jsonEncCipher_LoginCipher_totp_Maybe : Cipher_LoginCipher_totp_Maybe -> Value
393+jsonEncCipher_LoginCipher_totp_Maybe val = (maybeEncode (Json.Encode.string)) val
394+
395+
396+
386397type alias Cipher_LoginCipher_uris_List = (List String)
387398
388399jsonDecCipher_LoginCipher_uris_List : Json.Decode.Decoder ( Cipher_LoginCipher_uris_List )
@@ -407,14 +418,16 @@ jsonEncCipher_LoginCipher_username_Maybe val = (maybeEncode (Json.Encode.string
407418
408419type alias Cipher_LoginCipher =
409420 { password: Cipher_LoginCipher_password_Maybe
421+ , totp: Cipher_LoginCipher_totp_Maybe
410422 , uris: Cipher_LoginCipher_uris_List
411423 , username: Cipher_LoginCipher_username_Maybe
412424 }
413425
414426jsonDecCipher_LoginCipher : Json.Decode.Decoder ( Cipher_LoginCipher )
415427jsonDecCipher_LoginCipher =
416− Json.Decode.succeed (\ppassword puris pusername -> {password = ppassword, uris = puris, username = pusername})
428+ Json.Decode.succeed (\ppassword ptotp puris pusername -> {password = ppassword, totp = ptotp, uris = puris, username = pusername})
417429 |> required "password" (jsonDecCipher_LoginCipher_password_Maybe)
430+ |> required "totp" (jsonDecCipher_LoginCipher_totp_Maybe)
418431 |> required "uris" (jsonDecCipher_LoginCipher_uris_List)
419432 |> required "username" (jsonDecCipher_LoginCipher_username_Maybe)
420433
@@ -422,6 +435,7 @@ jsonEncCipher_LoginCipher : Cipher_LoginCipher -> Value
422435jsonEncCipher_LoginCipher val =
423436 Json.Encode.object
424437 [ ("password", jsonEncCipher_LoginCipher_password_Maybe val.password)
438+ , ("totp", jsonEncCipher_LoginCipher_totp_Maybe val.totp)
425439 , ("uris", jsonEncCipher_LoginCipher_uris_List val.uris)
426440 , ("username", jsonEncCipher_LoginCipher_username_Maybe val.username)
427441 ]
@@ -512,6 +526,7 @@ type Cmd =
512526 | NeedsReset
513527 | Open String
514528 | RequestCipher String
529+ | RequestTotp String
515530 | SendMasterPassword String
516531 | UpdateCipher FullCipher
517532
@@ -529,6 +544,7 @@ jsonDecCmd =
529544 , ("NeedsReset", Json.Decode.lazy (\_ -> Json.Decode.succeed NeedsReset))
530545 , ("Open", Json.Decode.lazy (\_ -> Json.Decode.map Open (Json.Decode.string)))
531546 , ("RequestCipher", Json.Decode.lazy (\_ -> Json.Decode.map RequestCipher (Json.Decode.string)))
547+ , ("RequestTotp", Json.Decode.lazy (\_ -> Json.Decode.map RequestTotp (Json.Decode.string)))
532548 , ("SendMasterPassword", Json.Decode.lazy (\_ -> Json.Decode.map SendMasterPassword (Json.Decode.string)))
533549 , ("UpdateCipher", Json.Decode.lazy (\_ -> Json.Decode.map UpdateCipher (jsonDecFullCipher)))
534550 ]
@@ -549,6 +565,7 @@ jsonEncCmd val =
549565 NeedsReset -> ("NeedsReset", encodeValue (Json.Encode.list identity []))
550566 Open v1 -> ("Open", encodeValue (Json.Encode.string v1))
551567 RequestCipher v1 -> ("RequestCipher", encodeValue (Json.Encode.string v1))
568+ RequestTotp v1 -> ("RequestTotp", encodeValue (Json.Encode.string v1))
552569 SendMasterPassword v1 -> ("SendMasterPassword", encodeValue (Json.Encode.string v1))
553570 UpdateCipher v1 -> ("UpdateCipher", encodeValue (jsonEncFullCipher v1))
554571 in encodeSumTaggedObject "tag" "contents" keyval val
@@ -700,6 +717,29 @@ jsonEncSub_NeedsMasterPassword val =
700717
701718
702719
720+type alias Sub_Totp =
721+ { code: String
722+ , interval: Int
723+ , source: String
724+ }
725+
726+jsonDecSub_Totp : Json.Decode.Decoder ( Sub_Totp )
727+jsonDecSub_Totp =
728+ Json.Decode.succeed (\pcode pinterval psource -> {code = pcode, interval = pinterval, source = psource})
729+ |> required "code" (Json.Decode.string)
730+ |> required "interval" (Json.Decode.int)
731+ |> required "source" (Json.Decode.string)
732+
733+jsonEncSub_Totp : Sub_Totp -> Value
734+jsonEncSub_Totp val =
735+ Json.Encode.object
736+ [ ("code", Json.Encode.string val.code)
737+ , ("interval", Json.Encode.int val.interval)
738+ , ("source", Json.Encode.string val.source)
739+ ]
740+
741+
742+
703743type Sub =
704744 CaptchaDone
705745 | CipherChanged FullCipher
@@ -714,6 +754,7 @@ type Sub =
714754 | NeedsMasterPassword Sub_NeedsMasterPassword
715755 | RecieveEmail String
716756 | Reset
757+ | Totp Sub_Totp
717758 | WrongPassword
718759
719760jsonDecSub : Json.Decode.Decoder ( Sub )
@@ -732,6 +773,7 @@ jsonDecSub =
732773 , ("NeedsMasterPassword", Json.Decode.lazy (\_ -> Json.Decode.map NeedsMasterPassword (jsonDecSub_NeedsMasterPassword)))
733774 , ("RecieveEmail", Json.Decode.lazy (\_ -> Json.Decode.map RecieveEmail (Json.Decode.string)))
734775 , ("Reset", Json.Decode.lazy (\_ -> Json.Decode.succeed Reset))
776+ , ("Totp", Json.Decode.lazy (\_ -> Json.Decode.map Totp (jsonDecSub_Totp)))
735777 , ("WrongPassword", Json.Decode.lazy (\_ -> Json.Decode.succeed WrongPassword))
736778 ]
737779 jsonDecObjectSetSub = Set.fromList []
@@ -753,6 +795,7 @@ jsonEncSub val =
753795 NeedsMasterPassword v1 -> ("NeedsMasterPassword", encodeValue (jsonEncSub_NeedsMasterPassword v1))
754796 RecieveEmail v1 -> ("RecieveEmail", encodeValue (Json.Encode.string v1))
755797 Reset -> ("Reset", encodeValue (Json.Encode.list identity []))
798+ Totp v1 -> ("Totp", encodeValue (jsonEncSub_Totp v1))
756799 WrongPassword -> ("WrongPassword", encodeValue (Json.Encode.list identity []))
757800 in encodeSumTaggedObject "tag" "contents" keyval val
758801