packages feed

jsaddle-dom-0.10.0.0: src/JSDOM/Generated/AuthenticationExtensionsClientOutputs.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from webauthn-4 (webref). Do not edit.
module JSDOM.Generated.AuthenticationExtensionsClientOutputs
       (newAuthenticationExtensionsClientOutputs, setCredBlob, getCredBlob, getCredBlobUnsafe, getCredBlobUnchecked, setGetCredBlob, getGetCredBlob, getGetCredBlobUnsafe, getGetCredBlobUnchecked, setHmacCreateSecret, getHmacCreateSecret, getHmacCreateSecretUnsafe, getHmacCreateSecretUnchecked, setHmacGetSecret, getHmacGetSecret, getHmacGetSecretUnsafe, getHmacGetSecretUnchecked, setPayment, getPayment, getPaymentUnsafe, getPaymentUnchecked, setAppid, getAppid, getAppidUnsafe, getAppidUnchecked, setAppidExclude, getAppidExclude, getAppidExcludeUnsafe, getAppidExcludeUnchecked, setCredProps, getCredProps, getCredPropsUnsafe, getCredPropsUnchecked, setPrf, getPrf, getPrfUnsafe, getPrfUnchecked, setLargeBlob, getLargeBlob, getLargeBlobUnsafe, getLargeBlobUnchecked, setRemoteClientDataJSON, getRemoteClientDataJSON, getRemoteClientDataJSONUnsafe, getRemoteClientDataJSONUnchecked, AuthenticationExtensionsClientOutputs(..), gTypeAuthenticationExtensionsClientOutputs)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import Language.Javascript.JSaddle (JSM, JSVal, JSString, toJSVal, valToBool, valToNumber, js, jss, jsf, jsg, new, function, asyncFunction, jsUndefined, jsNull)
import JSDOM.Types
import qualified JSDOM.Types as Types
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Generated.Enums

-- | <https://w3c.github.io/webauthn/#dictdef-authenticationextensionsclientoutputs AuthenticationExtensionsClientOutputs specification>
newAuthenticationExtensionsClientOutputs :: (MonadDOM m) => m AuthenticationExtensionsClientOutputs
newAuthenticationExtensionsClientOutputs = liftDOM ((((new (jsg "Object") () >>= \o -> P.return o)) >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-credblob AuthenticationExtensionsClientOutputs.credBlob specification>
setCredBlob :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> Bool -> m ()
setCredBlob self val = liftDOM (void (self ^. jss "credBlob" (toJSVal val)))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-credblob AuthenticationExtensionsClientOutputs.credBlob specification>
getCredBlob :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe Bool)
getCredBlob self = liftDOM (((self ^. js "credBlob") >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-credblob AuthenticationExtensionsClientOutputs.credBlob specification>
getCredBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m Bool
getCredBlobUnsafe self = liftDOM ((((self ^. js "credBlob") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-credblob AuthenticationExtensionsClientOutputs.credBlob specification>
getCredBlobUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m Bool
getCredBlobUnchecked self = liftDOM (((self ^. js "credBlob") >>= valToBool))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-getcredblob AuthenticationExtensionsClientOutputs.getCredBlob specification>
setGetCredBlob :: (MonadDOM m, IsArrayBuffer val) => AuthenticationExtensionsClientOutputs -> val -> m ()
setGetCredBlob self val = liftDOM (void (self ^. jss "getCredBlob" (toJSVal val)))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-getcredblob AuthenticationExtensionsClientOutputs.getCredBlob specification>
getGetCredBlob :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe ArrayBuffer)
getGetCredBlob self = liftDOM (((self ^. js "getCredBlob") >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-getcredblob AuthenticationExtensionsClientOutputs.getCredBlob specification>
getGetCredBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m ArrayBuffer
getGetCredBlobUnsafe self = liftDOM ((((self ^. js "getCredBlob") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-getcredblob AuthenticationExtensionsClientOutputs.getCredBlob specification>
getGetCredBlobUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m ArrayBuffer
getGetCredBlobUnchecked self = liftDOM (((self ^. js "getCredBlob") >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmaccreatesecret AuthenticationExtensionsClientOutputs.hmacCreateSecret specification>
setHmacCreateSecret :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> Bool -> m ()
setHmacCreateSecret self val = liftDOM (void (self ^. jss "hmacCreateSecret" (toJSVal val)))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmaccreatesecret AuthenticationExtensionsClientOutputs.hmacCreateSecret specification>
getHmacCreateSecret :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe Bool)
getHmacCreateSecret self = liftDOM (((self ^. js "hmacCreateSecret") >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmaccreatesecret AuthenticationExtensionsClientOutputs.hmacCreateSecret specification>
getHmacCreateSecretUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m Bool
getHmacCreateSecretUnsafe self = liftDOM ((((self ^. js "hmacCreateSecret") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmaccreatesecret AuthenticationExtensionsClientOutputs.hmacCreateSecret specification>
getHmacCreateSecretUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m Bool
getHmacCreateSecretUnchecked self = liftDOM (((self ^. js "hmacCreateSecret") >>= valToBool))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmacgetsecret AuthenticationExtensionsClientOutputs.hmacGetSecret specification>
setHmacGetSecret :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> HMACGetSecretOutput -> m ()
setHmacGetSecret self val = liftDOM (void (self ^. jss "hmacGetSecret" (toJSVal val)))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmacgetsecret AuthenticationExtensionsClientOutputs.hmacGetSecret specification>
getHmacGetSecret :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe HMACGetSecretOutput)
getHmacGetSecret self = liftDOM (((self ^. js "hmacGetSecret") >>= fromJSValUnchecked))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmacgetsecret AuthenticationExtensionsClientOutputs.hmacGetSecret specification>
getHmacGetSecretUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m HMACGetSecretOutput
getHmacGetSecretUnsafe self = liftDOM ((((self ^. js "hmacGetSecret") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://fidoalliance.org/specs/fido-v2.3-ps-20260226/fido-client-to-authenticator-protocol-v2.3-ps-20260226.html#dom-authenticationextensionsclientoutputs-hmacgetsecret AuthenticationExtensionsClientOutputs.hmacGetSecret specification>
getHmacGetSecretUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m HMACGetSecretOutput
getHmacGetSecretUnchecked self = liftDOM (((self ^. js "hmacGetSecret") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/secure-payment-confirmation/#dom-authenticationextensionsclientoutputs-payment AuthenticationExtensionsClientOutputs.payment specification>
setPayment :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> AuthenticationExtensionsPaymentOutputs -> m ()
setPayment self val = liftDOM (void (self ^. jss "payment" (toJSVal val)))

-- | <https://w3c.github.io/secure-payment-confirmation/#dom-authenticationextensionsclientoutputs-payment AuthenticationExtensionsClientOutputs.payment specification>
getPayment :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe AuthenticationExtensionsPaymentOutputs)
getPayment self = liftDOM (((self ^. js "payment") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/secure-payment-confirmation/#dom-authenticationextensionsclientoutputs-payment AuthenticationExtensionsClientOutputs.payment specification>
getPaymentUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsPaymentOutputs
getPaymentUnsafe self = liftDOM ((((self ^. js "payment") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/secure-payment-confirmation/#dom-authenticationextensionsclientoutputs-payment AuthenticationExtensionsClientOutputs.payment specification>
getPaymentUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsPaymentOutputs
getPaymentUnchecked self = liftDOM (((self ^. js "payment") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appid AuthenticationExtensionsClientOutputs.appid specification>
setAppid :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> Bool -> m ()
setAppid self val = liftDOM (void (self ^. jss "appid" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appid AuthenticationExtensionsClientOutputs.appid specification>
getAppid :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe Bool)
getAppid self = liftDOM (((self ^. js "appid") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appid AuthenticationExtensionsClientOutputs.appid specification>
getAppidUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m Bool
getAppidUnsafe self = liftDOM ((((self ^. js "appid") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appid AuthenticationExtensionsClientOutputs.appid specification>
getAppidUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m Bool
getAppidUnchecked self = liftDOM (((self ^. js "appid") >>= valToBool))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appidexclude AuthenticationExtensionsClientOutputs.appidExclude specification>
setAppidExclude :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> Bool -> m ()
setAppidExclude self val = liftDOM (void (self ^. jss "appidExclude" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appidexclude AuthenticationExtensionsClientOutputs.appidExclude specification>
getAppidExclude :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe Bool)
getAppidExclude self = liftDOM (((self ^. js "appidExclude") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appidexclude AuthenticationExtensionsClientOutputs.appidExclude specification>
getAppidExcludeUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m Bool
getAppidExcludeUnsafe self = liftDOM ((((self ^. js "appidExclude") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-appidexclude AuthenticationExtensionsClientOutputs.appidExclude specification>
getAppidExcludeUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m Bool
getAppidExcludeUnchecked self = liftDOM (((self ^. js "appidExclude") >>= valToBool))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-credprops AuthenticationExtensionsClientOutputs.credProps specification>
setCredProps :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> CredentialPropertiesOutput -> m ()
setCredProps self val = liftDOM (void (self ^. jss "credProps" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-credprops AuthenticationExtensionsClientOutputs.credProps specification>
getCredProps :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe CredentialPropertiesOutput)
getCredProps self = liftDOM (((self ^. js "credProps") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-credprops AuthenticationExtensionsClientOutputs.credProps specification>
getCredPropsUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m CredentialPropertiesOutput
getCredPropsUnsafe self = liftDOM ((((self ^. js "credProps") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-credprops AuthenticationExtensionsClientOutputs.credProps specification>
getCredPropsUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m CredentialPropertiesOutput
getCredPropsUnchecked self = liftDOM (((self ^. js "credProps") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-prf AuthenticationExtensionsClientOutputs.prf specification>
setPrf :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> AuthenticationExtensionsPRFOutputs -> m ()
setPrf self val = liftDOM (void (self ^. jss "prf" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-prf AuthenticationExtensionsClientOutputs.prf specification>
getPrf :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe AuthenticationExtensionsPRFOutputs)
getPrf self = liftDOM (((self ^. js "prf") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-prf AuthenticationExtensionsClientOutputs.prf specification>
getPrfUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsPRFOutputs
getPrfUnsafe self = liftDOM ((((self ^. js "prf") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-prf AuthenticationExtensionsClientOutputs.prf specification>
getPrfUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsPRFOutputs
getPrfUnchecked self = liftDOM (((self ^. js "prf") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-largeblob AuthenticationExtensionsClientOutputs.largeBlob specification>
setLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> AuthenticationExtensionsLargeBlobOutputs -> m ()
setLargeBlob self val = liftDOM (void (self ^. jss "largeBlob" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-largeblob AuthenticationExtensionsClientOutputs.largeBlob specification>
getLargeBlob :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe AuthenticationExtensionsLargeBlobOutputs)
getLargeBlob self = liftDOM (((self ^. js "largeBlob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-largeblob AuthenticationExtensionsClientOutputs.largeBlob specification>
getLargeBlobUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsLargeBlobOutputs
getLargeBlobUnsafe self = liftDOM ((((self ^. js "largeBlob") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-largeblob AuthenticationExtensionsClientOutputs.largeBlob specification>
getLargeBlobUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m AuthenticationExtensionsLargeBlobOutputs
getLargeBlobUnchecked self = liftDOM (((self ^. js "largeBlob") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-remoteclientdatajson AuthenticationExtensionsClientOutputs.remoteClientDataJSON specification>
setRemoteClientDataJSON :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> Bool -> m ()
setRemoteClientDataJSON self val = liftDOM (void (self ^. jss "remoteClientDataJSON" (toJSVal val)))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-remoteclientdatajson AuthenticationExtensionsClientOutputs.remoteClientDataJSON specification>
getRemoteClientDataJSON :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m (Maybe Bool)
getRemoteClientDataJSON self = liftDOM (((self ^. js "remoteClientDataJSON") >>= fromJSValUnchecked))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-remoteclientdatajson AuthenticationExtensionsClientOutputs.remoteClientDataJSON specification>
getRemoteClientDataJSONUnsafe :: (MonadDOM m, HasCallStack) => AuthenticationExtensionsClientOutputs -> m Bool
getRemoteClientDataJSONUnsafe self = liftDOM ((((self ^. js "remoteClientDataJSON") >>= fromJSValUnchecked) >>= P.maybe (P.error "Nothing to return") P.return))

-- | <https://w3c.github.io/webauthn/#dom-authenticationextensionsclientoutputs-remoteclientdatajson AuthenticationExtensionsClientOutputs.remoteClientDataJSON specification>
getRemoteClientDataJSONUnchecked :: (MonadDOM m) => AuthenticationExtensionsClientOutputs -> m Bool
getRemoteClientDataJSONUnchecked self = liftDOM (((self ^. js "remoteClientDataJSON") >>= valToBool))