0 | module Web.Internal.PermissionsPrim
  1 |
  2 | import JS
  3 | import Web.Internal.Types
  4 |
  5 | %default total
  6 |
  7 |
  8 | --------------------------------------------------------------------------------
  9 | --          Interfaces
 10 | --------------------------------------------------------------------------------
 11 |
 12 | namespace PermissionStatus
 13 |
 14 |   export
 15 |   %foreign "browser:lambda:x=>x.onchange"
 16 |   prim__onchange : PermissionStatus -> PrimIO (Nullable EventHandlerNonNull)
 17 |
 18 |
 19 |
 20 |   export
 21 |   %foreign "browser:lambda:(x,v)=>{x.onchange = v}"
 22 |   prim__setOnchange :
 23 |        PermissionStatus
 24 |     -> Nullable EventHandlerNonNull
 25 |     -> PrimIO ()
 26 |
 27 |
 28 |
 29 |   export
 30 |   %foreign "browser:lambda:x=>x.state"
 31 |   prim__state : PermissionStatus -> PrimIO String
 32 |
 33 |
 34 |
 35 | namespace Permissions
 36 |
 37 |   export
 38 |   %foreign "browser:lambda:(x,a)=>x.query(a)"
 39 |   prim__query : Permissions -> Object -> PrimIO (Promise PermissionStatus)
 40 |
 41 |
 42 |
 43 |
 44 |
 45 | --------------------------------------------------------------------------------
 46 | --          Dictionaries
 47 | --------------------------------------------------------------------------------
 48 |
 49 | namespace CameraDevicePermissionDescriptor
 50 |
 51 |   export
 52 |   %foreign "browser:lambda:(a)=> ({panTiltZoom: a})"
 53 |   prim__new : UndefOr Boolean -> PrimIO CameraDevicePermissionDescriptor
 54 |
 55 |
 56 |   export
 57 |   %foreign "browser:lambda:x=>x.panTiltZoom"
 58 |   prim__panTiltZoom :
 59 |        CameraDevicePermissionDescriptor
 60 |     -> PrimIO (UndefOr Boolean)
 61 |
 62 |
 63 |
 64 |   export
 65 |   %foreign "browser:lambda:(x,v)=>{x.panTiltZoom = v}"
 66 |   prim__setPanTiltZoom :
 67 |        CameraDevicePermissionDescriptor
 68 |     -> UndefOr Boolean
 69 |     -> PrimIO ()
 70 |
 71 |
 72 |
 73 |
 74 | namespace DevicePermissionDescriptor
 75 |
 76 |   export
 77 |   %foreign "browser:lambda:(a)=> ({deviceId: a})"
 78 |   prim__new : UndefOr String -> PrimIO DevicePermissionDescriptor
 79 |
 80 |
 81 |   export
 82 |   %foreign "browser:lambda:x=>x.deviceId"
 83 |   prim__deviceId : DevicePermissionDescriptor -> PrimIO (UndefOr String)
 84 |
 85 |
 86 |
 87 |   export
 88 |   %foreign "browser:lambda:(x,v)=>{x.deviceId = v}"
 89 |   prim__setDeviceId : DevicePermissionDescriptor -> UndefOr String -> PrimIO ()
 90 |
 91 |
 92 |
 93 |
 94 | namespace MidiPermissionDescriptor
 95 |
 96 |   export
 97 |   %foreign "browser:lambda:(a)=> ({sysex: a})"
 98 |   prim__new : UndefOr Boolean -> PrimIO MidiPermissionDescriptor
 99 |
100 |
101 |   export
102 |   %foreign "browser:lambda:x=>x.sysex"
103 |   prim__sysex : MidiPermissionDescriptor -> PrimIO (UndefOr Boolean)
104 |
105 |
106 |
107 |   export
108 |   %foreign "browser:lambda:(x,v)=>{x.sysex = v}"
109 |   prim__setSysex : MidiPermissionDescriptor -> UndefOr Boolean -> PrimIO () -- gitleaks:allow
110 |
111 |
112 |
113 |
114 | namespace PermissionDescriptor
115 |
116 |   export
117 |   %foreign "browser:lambda:(a)=> ({name: a})"
118 |   prim__new : String -> PrimIO PermissionDescriptor
119 |
120 |
121 |   export
122 |   %foreign "browser:lambda:x=>x.name"
123 |   prim__name : PermissionDescriptor -> PrimIO String
124 |
125 |
126 |
127 |   export
128 |   %foreign "browser:lambda:(x,v)=>{x.name = v}"
129 |   prim__setName : PermissionDescriptor -> String -> PrimIO ()
130 |
131 |
132 |
133 |
134 | namespace PermissionSetParameters
135 |
136 |   export
137 |   %foreign "browser:lambda:(a,b,c)=> ({descriptor: a,state: b,oneRealm: c})"
138 |   prim__new :
139 |        PermissionDescriptor
140 |     -> String
141 |     -> UndefOr Boolean
142 |     -> PrimIO PermissionSetParameters
143 |
144 |
145 |   export
146 |   %foreign "browser:lambda:x=>x.descriptor"
147 |   prim__descriptor : PermissionSetParameters -> PrimIO PermissionDescriptor
148 |
149 |
150 |
151 |   export
152 |   %foreign "browser:lambda:(x,v)=>{x.descriptor = v}"
153 |   prim__setDescriptor :
154 |        PermissionSetParameters
155 |     -> PermissionDescriptor
156 |     -> PrimIO ()
157 |
158 |
159 |
160 |   export
161 |   %foreign "browser:lambda:x=>x.oneRealm"
162 |   prim__oneRealm : PermissionSetParameters -> PrimIO (UndefOr Boolean)
163 |
164 |
165 |
166 |   export
167 |   %foreign "browser:lambda:(x,v)=>{x.oneRealm = v}"
168 |   prim__setOneRealm : PermissionSetParameters -> UndefOr Boolean -> PrimIO ()
169 |
170 |
171 |
172 |   export
173 |   %foreign "browser:lambda:x=>x.state"
174 |   prim__state : PermissionSetParameters -> PrimIO String
175 |
176 |
177 |
178 |   export
179 |   %foreign "browser:lambda:(x,v)=>{x.state = v}"
180 |   prim__setState : PermissionSetParameters -> String -> PrimIO ()
181 |
182 |
183 |
184 |
185 | namespace PushPermissionDescriptor
186 |
187 |   export
188 |   %foreign "browser:lambda:(a)=> ({userVisibleOnly: a})"
189 |   prim__new : UndefOr Boolean -> PrimIO PushPermissionDescriptor
190 |
191 |
192 |   export
193 |   %foreign "browser:lambda:x=>x.userVisibleOnly"
194 |   prim__userVisibleOnly : PushPermissionDescriptor -> PrimIO (UndefOr Boolean)
195 |
196 |
197 |
198 |   export
199 |   %foreign "browser:lambda:(x,v)=>{x.userVisibleOnly = v}"
200 |   prim__setUserVisibleOnly :
201 |        PushPermissionDescriptor
202 |     -> UndefOr Boolean
203 |     -> PrimIO ()
204 |