on master help sign in
Use wrap
commitd5bce0f957bd9636c9934065207e65cf8ed3bb7f authoriko <ilyakooo0@gmail.com> dateWed 3 Aug 2022, 10:47 (4 years ago) parentd1d1481
2 files changed+64−28
backend/Bridge.purs+35 backend/Main.purs+29−28
backend/Bridge.purs+35
@@ -19,6 +19,7 @@ newtype Cmd_Login =
1919 , server :: String
2020 }
2121
22+derive instance newtypeCmd_Login :: Newtype Cmd_Login _
2223instance encodeJsonCmd_Login :: EncodeJson Cmd_Login where
2324 encodeJson = genericEncodeAeson Argonaut.defaultOptions
2425instance decodeJsonCmd_Login :: DecodeJson Cmd_Login where
@@ -49,6 +50,7 @@ derive instance ordCmd :: Ord Cmd
4950newtype Sub_LoadCipher_cipherType_CardCipher_brand_Maybe =
5051 Sub_LoadCipher_cipherType_CardCipher_brand_Maybe (Maybe String)
5152
53+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_brand_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_brand_Maybe _
5254instance encodeJsonSub_LoadCipher_cipherType_CardCipher_brand_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_brand_Maybe where
5355 encodeJson = genericEncodeAeson Argonaut.defaultOptions
5456instance decodeJsonSub_LoadCipher_cipherType_CardCipher_brand_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_brand_Maybe where
@@ -60,6 +62,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher_brand_Maybe :: Ord Sub_L
6062newtype Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe =
6163 Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe (Maybe String)
6264
65+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe _
6366instance encodeJsonSub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe where
6467 encodeJson = genericEncodeAeson Argonaut.defaultOptions
6568instance decodeJsonSub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe where
@@ -71,6 +74,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe ::
7174newtype Sub_LoadCipher_cipherType_CardCipher_code_Maybe =
7275 Sub_LoadCipher_cipherType_CardCipher_code_Maybe (Maybe String)
7376
77+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_code_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_code_Maybe _
7478instance encodeJsonSub_LoadCipher_cipherType_CardCipher_code_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_code_Maybe where
7579 encodeJson = genericEncodeAeson Argonaut.defaultOptions
7680instance decodeJsonSub_LoadCipher_cipherType_CardCipher_code_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_code_Maybe where
@@ -82,6 +86,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher_code_Maybe :: Ord Sub_Lo
8286newtype Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe =
8387 Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe (Maybe String)
8488
89+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_expMonth_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe _
8590instance encodeJsonSub_LoadCipher_cipherType_CardCipher_expMonth_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe where
8691 encodeJson = genericEncodeAeson Argonaut.defaultOptions
8792instance decodeJsonSub_LoadCipher_cipherType_CardCipher_expMonth_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe where
@@ -93,6 +98,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher_expMonth_Maybe :: Ord Su
9398newtype Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe =
9499 Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe (Maybe String)
95100
101+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_expYear_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe _
96102instance encodeJsonSub_LoadCipher_cipherType_CardCipher_expYear_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe where
97103 encodeJson = genericEncodeAeson Argonaut.defaultOptions
98104instance decodeJsonSub_LoadCipher_cipherType_CardCipher_expYear_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe where
@@ -104,6 +110,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher_expYear_Maybe :: Ord Sub
104110newtype Sub_LoadCipher_cipherType_CardCipher_number_Maybe =
105111 Sub_LoadCipher_cipherType_CardCipher_number_Maybe (Maybe String)
106112
113+derive instance newtypeSub_LoadCipher_cipherType_CardCipher_number_Maybe :: Newtype Sub_LoadCipher_cipherType_CardCipher_number_Maybe _
107114instance encodeJsonSub_LoadCipher_cipherType_CardCipher_number_Maybe :: EncodeJson Sub_LoadCipher_cipherType_CardCipher_number_Maybe where
108115 encodeJson = genericEncodeAeson Argonaut.defaultOptions
109116instance decodeJsonSub_LoadCipher_cipherType_CardCipher_number_Maybe :: DecodeJson Sub_LoadCipher_cipherType_CardCipher_number_Maybe where
@@ -122,6 +129,7 @@ newtype Sub_LoadCipher_cipherType_CardCipher =
122129 , number :: Sub_LoadCipher_cipherType_CardCipher_number_Maybe
123130 }
124131
132+derive instance newtypeSub_LoadCipher_cipherType_CardCipher :: Newtype Sub_LoadCipher_cipherType_CardCipher _
125133instance encodeJsonSub_LoadCipher_cipherType_CardCipher :: EncodeJson Sub_LoadCipher_cipherType_CardCipher where
126134 encodeJson = genericEncodeAeson Argonaut.defaultOptions
127135instance decodeJsonSub_LoadCipher_cipherType_CardCipher :: DecodeJson Sub_LoadCipher_cipherType_CardCipher where
@@ -133,6 +141,7 @@ derive instance ordSub_LoadCipher_cipherType_CardCipher :: Ord Sub_LoadCipher_ci
133141newtype Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe =
134142 Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe (Maybe String)
135143
144+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_address1_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe _
136145instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_address1_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe where
137146 encodeJson = genericEncodeAeson Argonaut.defaultOptions
138147instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_address1_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe where
@@ -144,6 +153,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_address1_Maybe :: Or
144153newtype Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe =
145154 Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe (Maybe String)
146155
156+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_address2_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe _
147157instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_address2_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe where
148158 encodeJson = genericEncodeAeson Argonaut.defaultOptions
149159instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_address2_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe where
@@ -155,6 +165,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_address2_Maybe :: Or
155165newtype Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe =
156166 Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe (Maybe String)
157167
168+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_address3_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe _
158169instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_address3_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe where
159170 encodeJson = genericEncodeAeson Argonaut.defaultOptions
160171instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_address3_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe where
@@ -166,6 +177,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_address3_Maybe :: Or
166177newtype Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe =
167178 Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe (Maybe String)
168179
180+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_city_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe _
169181instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_city_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe where
170182 encodeJson = genericEncodeAeson Argonaut.defaultOptions
171183instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_city_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe where
@@ -177,6 +189,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_city_Maybe :: Ord Su
177189newtype Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe =
178190 Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe (Maybe String)
179191
192+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_company_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe _
180193instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_company_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe where
181194 encodeJson = genericEncodeAeson Argonaut.defaultOptions
182195instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_company_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe where
@@ -188,6 +201,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_company_Maybe :: Ord
188201newtype Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe =
189202 Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe (Maybe String)
190203
204+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_country_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe _
191205instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_country_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe where
192206 encodeJson = genericEncodeAeson Argonaut.defaultOptions
193207instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_country_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe where
@@ -199,6 +213,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_country_Maybe :: Ord
199213newtype Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe =
200214 Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe (Maybe String)
201215
216+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_email_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe _
202217instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_email_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe where
203218 encodeJson = genericEncodeAeson Argonaut.defaultOptions
204219instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_email_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe where
@@ -210,6 +225,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_email_Maybe :: Ord S
210225newtype Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe =
211226 Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe (Maybe String)
212227
228+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe _
213229instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe where
214230 encodeJson = genericEncodeAeson Argonaut.defaultOptions
215231instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe where
@@ -221,6 +237,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe :: O
221237newtype Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe =
222238 Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe (Maybe String)
223239
240+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe _
224241instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe where
225242 encodeJson = genericEncodeAeson Argonaut.defaultOptions
226243instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe where
@@ -232,6 +249,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe :: Or
232249newtype Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe =
233250 Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe (Maybe String)
234251
252+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe _
235253instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe where
236254 encodeJson = genericEncodeAeson Argonaut.defaultOptions
237255instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe where
@@ -243,6 +261,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe
243261newtype Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe =
244262 Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe (Maybe String)
245263
264+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe _
246265instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe where
247266 encodeJson = genericEncodeAeson Argonaut.defaultOptions
248267instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe where
@@ -254,6 +273,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe ::
254273newtype Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe =
255274 Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe (Maybe String)
256275
276+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe _
257277instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe where
258278 encodeJson = genericEncodeAeson Argonaut.defaultOptions
259279instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe where
@@ -265,6 +285,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe
265285newtype Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe =
266286 Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe (Maybe String)
267287
288+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_phone_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe _
268289instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_phone_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe where
269290 encodeJson = genericEncodeAeson Argonaut.defaultOptions
270291instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_phone_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe where
@@ -276,6 +297,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_phone_Maybe :: Ord S
276297newtype Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe =
277298 Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe (Maybe String)
278299
300+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe _
279301instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe where
280302 encodeJson = genericEncodeAeson Argonaut.defaultOptions
281303instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe where
@@ -287,6 +309,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe ::
287309newtype Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe =
288310 Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe (Maybe String)
289311
312+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe _
290313instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe where
291314 encodeJson = genericEncodeAeson Argonaut.defaultOptions
292315instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe where
@@ -298,6 +321,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe :: Ord Sub
298321newtype Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe =
299322 Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe (Maybe String)
300323
324+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_state_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe _
301325instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_state_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe where
302326 encodeJson = genericEncodeAeson Argonaut.defaultOptions
303327instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_state_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe where
@@ -309,6 +333,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_state_Maybe :: Ord S
309333newtype Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe =
310334 Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe (Maybe String)
311335
336+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_title_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe _
312337instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_title_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe where
313338 encodeJson = genericEncodeAeson Argonaut.defaultOptions
314339instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_title_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe where
@@ -320,6 +345,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher_title_Maybe :: Ord S
320345newtype Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe =
321346 Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe (Maybe String)
322347
348+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher_username_Maybe :: Newtype Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe _
323349instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher_username_Maybe :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe where
324350 encodeJson = genericEncodeAeson Argonaut.defaultOptions
325351instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher_username_Maybe :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe where
@@ -350,6 +376,7 @@ newtype Sub_LoadCipher_cipherType_IdentityCipher =
350376 , username :: Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe
351377 }
352378
379+derive instance newtypeSub_LoadCipher_cipherType_IdentityCipher :: Newtype Sub_LoadCipher_cipherType_IdentityCipher _
353380instance encodeJsonSub_LoadCipher_cipherType_IdentityCipher :: EncodeJson Sub_LoadCipher_cipherType_IdentityCipher where
354381 encodeJson = genericEncodeAeson Argonaut.defaultOptions
355382instance decodeJsonSub_LoadCipher_cipherType_IdentityCipher :: DecodeJson Sub_LoadCipher_cipherType_IdentityCipher where
@@ -361,6 +388,7 @@ derive instance ordSub_LoadCipher_cipherType_IdentityCipher :: Ord Sub_LoadCiphe
361388newtype Sub_LoadCipher_cipherType_LoginCipher_password_Maybe =
362389 Sub_LoadCipher_cipherType_LoginCipher_password_Maybe (Maybe String)
363390
391+derive instance newtypeSub_LoadCipher_cipherType_LoginCipher_password_Maybe :: Newtype Sub_LoadCipher_cipherType_LoginCipher_password_Maybe _
364392instance encodeJsonSub_LoadCipher_cipherType_LoginCipher_password_Maybe :: EncodeJson Sub_LoadCipher_cipherType_LoginCipher_password_Maybe where
365393 encodeJson = genericEncodeAeson Argonaut.defaultOptions
366394instance decodeJsonSub_LoadCipher_cipherType_LoginCipher_password_Maybe :: DecodeJson Sub_LoadCipher_cipherType_LoginCipher_password_Maybe where
@@ -372,6 +400,7 @@ derive instance ordSub_LoadCipher_cipherType_LoginCipher_password_Maybe :: Ord S
372400newtype Sub_LoadCipher_cipherType_LoginCipher_uris_List =
373401 Sub_LoadCipher_cipherType_LoginCipher_uris_List (Array String)
374402
403+derive instance newtypeSub_LoadCipher_cipherType_LoginCipher_uris_List :: Newtype Sub_LoadCipher_cipherType_LoginCipher_uris_List _
375404instance encodeJsonSub_LoadCipher_cipherType_LoginCipher_uris_List :: EncodeJson Sub_LoadCipher_cipherType_LoginCipher_uris_List where
376405 encodeJson = genericEncodeAeson Argonaut.defaultOptions
377406instance decodeJsonSub_LoadCipher_cipherType_LoginCipher_uris_List :: DecodeJson Sub_LoadCipher_cipherType_LoginCipher_uris_List where
@@ -383,6 +412,7 @@ derive instance ordSub_LoadCipher_cipherType_LoginCipher_uris_List :: Ord Sub_Lo
383412newtype Sub_LoadCipher_cipherType_LoginCipher_username_Maybe =
384413 Sub_LoadCipher_cipherType_LoginCipher_username_Maybe (Maybe String)
385414
415+derive instance newtypeSub_LoadCipher_cipherType_LoginCipher_username_Maybe :: Newtype Sub_LoadCipher_cipherType_LoginCipher_username_Maybe _
386416instance encodeJsonSub_LoadCipher_cipherType_LoginCipher_username_Maybe :: EncodeJson Sub_LoadCipher_cipherType_LoginCipher_username_Maybe where
387417 encodeJson = genericEncodeAeson Argonaut.defaultOptions
388418instance decodeJsonSub_LoadCipher_cipherType_LoginCipher_username_Maybe :: DecodeJson Sub_LoadCipher_cipherType_LoginCipher_username_Maybe where
@@ -398,6 +428,7 @@ newtype Sub_LoadCipher_cipherType_LoginCipher =
398428 , username :: Sub_LoadCipher_cipherType_LoginCipher_username_Maybe
399429 }
400430
431+derive instance newtypeSub_LoadCipher_cipherType_LoginCipher :: Newtype Sub_LoadCipher_cipherType_LoginCipher _
401432instance encodeJsonSub_LoadCipher_cipherType_LoginCipher :: EncodeJson Sub_LoadCipher_cipherType_LoginCipher where
402433 encodeJson = genericEncodeAeson Argonaut.defaultOptions
403434instance decodeJsonSub_LoadCipher_cipherType_LoginCipher :: DecodeJson Sub_LoadCipher_cipherType_LoginCipher where
@@ -427,6 +458,7 @@ newtype Sub_LoadCipher =
427458 , name :: String
428459 }
429460
461+derive instance newtypeSub_LoadCipher :: Newtype Sub_LoadCipher _
430462instance encodeJsonSub_LoadCipher :: EncodeJson Sub_LoadCipher where
431463 encodeJson = genericEncodeAeson Argonaut.defaultOptions
432464instance decodeJsonSub_LoadCipher :: DecodeJson Sub_LoadCipher where
@@ -457,6 +489,7 @@ newtype Sub_LoadCiphers =
457489 , name :: String
458490 }
459491
492+derive instance newtypeSub_LoadCiphers :: Newtype Sub_LoadCiphers _
460493instance encodeJsonSub_LoadCiphers :: EncodeJson Sub_LoadCiphers where
461494 encodeJson = genericEncodeAeson Argonaut.defaultOptions
462495instance decodeJsonSub_LoadCiphers :: DecodeJson Sub_LoadCiphers where
@@ -468,6 +501,7 @@ derive instance ordSub_LoadCiphers :: Ord Sub_LoadCiphers
468501newtype Sub_LoadCiphers_List =
469502 Sub_LoadCiphers_List (Array Sub_LoadCiphers)
470503
504+derive instance newtypeSub_LoadCiphers_List :: Newtype Sub_LoadCiphers_List _
471505instance encodeJsonSub_LoadCiphers_List :: EncodeJson Sub_LoadCiphers_List where
472506 encodeJson = genericEncodeAeson Argonaut.defaultOptions
473507instance decodeJsonSub_LoadCiphers_List :: DecodeJson Sub_LoadCiphers_List where
@@ -482,6 +516,7 @@ newtype Sub_NeedsMasterPassword =
482516 , server :: String
483517 }
484518
519+derive instance newtypeSub_NeedsMasterPassword :: Newtype Sub_NeedsMasterPassword _
485520instance encodeJsonSub_NeedsMasterPassword :: EncodeJson Sub_NeedsMasterPassword where
486521 encodeJson = genericEncodeAeson Argonaut.defaultOptions
487522instance decodeJsonSub_NeedsMasterPassword :: DecodeJson Sub_NeedsMasterPassword where
backend/Main.purs+29−28
@@ -23,6 +23,7 @@ import Data.JNullable (fromJNullable, jnull, nullify)
2323import Data.JNullable as JNullable
2424import Data.JOpt (fromJOpt)
2525import Data.Maybe (Maybe(..))
26+import Data.Newtype (wrap)
2627import Data.OpenURL (openURL)
2728import Data.Ord.Down (Down(..))
2829import Data.SymmetricCryptoKey (SymmetricCryptoKey)
@@ -139,49 +140,49 @@ main = do
139140 case JNullable.toMaybe cipher.login of
140141 Nothing -> throwError $ error "Login data is missing"
141142 Just login -> do
142− username <- Bridge.Sub_LoadCipher_cipherType_LoginCipher_username_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt login.username)
143− password <- Bridge.Sub_LoadCipher_cipherType_LoginCipher_password_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt login.password)
143+ username <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt login.username)
144+ password <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt login.password)
144145 uris <- fromJOpt [] <$> ((traverse >>> traverse) (_.uri >>> decrypt) login.uris)
145146 pure $ Bridge.LoginCipher $ Bridge.Sub_LoadCipher_cipherType_LoginCipher
146147 { username
147148 , password
148− , uris: Bridge.Sub_LoadCipher_cipherType_LoginCipher_uris_List uris
149+ , uris: wrap uris
149150 }
150151 n | cipherTypeCard == n -> do
151152 case JNullable.toMaybe cipher.card of
152153 Nothing -> throwError $ error "Card data is missing"
153154 Just card -> do
154− cardholderName <- Bridge.Sub_LoadCipher_cipherType_CardCipher_cardholderName_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.cardholderName)
155− number <- Bridge.Sub_LoadCipher_cipherType_CardCipher_number_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.number)
156− code <- Bridge.Sub_LoadCipher_cipherType_CardCipher_code_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.code)
157− brand <- Bridge.Sub_LoadCipher_cipherType_CardCipher_brand_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.brand)
158− expMonth <- Bridge.Sub_LoadCipher_cipherType_CardCipher_expMonth_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.expMonth)
159− expYear <- Bridge.Sub_LoadCipher_cipherType_CardCipher_expYear_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.expYear)
155+ cardholderName <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.cardholderName)
156+ number <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.number)
157+ code <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.code)
158+ brand <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.brand)
159+ expMonth <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.expMonth)
160+ expYear <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt card.expYear)
160161 pure $ Bridge.CardCipher $ Bridge.Sub_LoadCipher_cipherType_CardCipher
161162 { brand, cardholderName, code, expMonth, expYear, number }
162163 n | cipherTypeIdentity == n -> do
163164 case JNullable.toMaybe cipher.identity of
164165 Nothing -> throwError $ error "Identity data is missing"
165166 Just identity -> do
166− firstName <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_firstName_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.firstName)
167− middleName <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_middleName_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.middleName)
168− lastName <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_lastName_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.lastName)
169− address1 <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_address1_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address1)
170− address2 <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_address2_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address2)
171− address3 <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_address3_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address3)
172− city <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_city_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.city)
173− company <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_company_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.company)
174− country <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_country_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.country)
175− email <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_email_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.email)
176− licenseNumber <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_licenseNumber_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.licenseNumber)
177− passportNumber <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_passportNumber_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.passportNumber)
178− phone <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_phone_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.phone)
179− postalCode <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_postalCode_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.postalCode)
180− ssn <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_ssn_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.ssn)
181− state <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_state_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.state)
182− title <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_title_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.title)
183− username <- Bridge.Sub_LoadCipher_cipherType_IdentityCipher_username_Maybe <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.username)
184− pure $ Bridge.IdentityCipher $ Bridge.Sub_LoadCipher_cipherType_IdentityCipher
167+ firstName <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.firstName)
168+ middleName <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.middleName)
169+ lastName <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.lastName)
170+ address1 <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address1)
171+ address2 <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address2)
172+ address3 <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.address3)
173+ city <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.city)
174+ company <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.company)
175+ country <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.country)
176+ email <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.email)
177+ licenseNumber <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.licenseNumber)
178+ passportNumber <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.passportNumber)
179+ phone <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.phone)
180+ postalCode <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.postalCode)
181+ ssn <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.ssn)
182+ state <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.state)
183+ title <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.title)
184+ username <- wrap <<< fromJNullable Nothing <<< map Just <$> (traverse decrypt identity.username)
185+ pure $ Bridge.IdentityCipher $ wrap
185186 { firstName,
186187 middleName,
187188 lastName,