0 | module Web.Raw.Serviceworker
   1 |
   2 | import JS
   3 | import Web.Internal.ServiceworkerPrim
   4 | import Web.Internal.Types
   5 |
   6 | %default total
   7 |
   8 |
   9 | --------------------------------------------------------------------------------
  10 | --          Interfaces
  11 | --------------------------------------------------------------------------------
  12 |
  13 | namespace Cache
  14 |
  15 |   export
  16 |   addAll :
  17 |        (obj : Cache)
  18 |     -> (requests : Array (Union2 Request String))
  19 |     -> JSIO (Promise Undefined)
  20 |   addAll a b = primJS $ Cache.prim__addAll a b
  21 |
  22 |
  23 |   export
  24 |   add :
  25 |        (obj : Cache)
  26 |     -> (request : HSum [Request, String])
  27 |     -> JSIO (Promise Undefined)
  28 |   add a b = primJS $ Cache.prim__add a (toFFI b)
  29 |
  30 |
  31 |   export
  32 |   delete' :
  33 |        {auto 0 _ : JSType t3}
  34 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t3)}
  35 |     -> (obj : Cache)
  36 |     -> (request : HSum [Request, String])
  37 |     -> (options : Optional t3)
  38 |     -> JSIO (Promise Boolean)
  39 |   delete' a b c = primJS $ Cache.prim__delete a (toFFI b) (optUp c)
  40 |
  41 |   export
  42 |   delete :
  43 |        (obj : Cache)
  44 |     -> (request : HSum [Request, String])
  45 |     -> JSIO (Promise Boolean)
  46 |   delete a b = primJS $ Cache.prim__delete a (toFFI b) undef
  47 |
  48 |
  49 |   export
  50 |   keys' :
  51 |        {auto 0 _ : JSType t3}
  52 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t3)}
  53 |     -> (obj : Cache)
  54 |     -> (request : Optional (HSum [Request, String]))
  55 |     -> (options : Optional t3)
  56 |     -> JSIO (Promise (Array Request))
  57 |   keys' a b c = primJS $ Cache.prim__keys a (toFFI b) (optUp c)
  58 |
  59 |   export
  60 |   keys : (obj : Cache) -> JSIO (Promise (Array Request))
  61 |   keys a = primJS $ Cache.prim__keys a undef undef
  62 |
  63 |
  64 |   export
  65 |   matchAll' :
  66 |        {auto 0 _ : JSType t3}
  67 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t3)}
  68 |     -> (obj : Cache)
  69 |     -> (request : Optional (HSum [Request, String]))
  70 |     -> (options : Optional t3)
  71 |     -> JSIO (Promise (Array Response))
  72 |   matchAll' a b c = primJS $ Cache.prim__matchAll a (toFFI b) (optUp c)
  73 |
  74 |   export
  75 |   matchAll : (obj : Cache) -> JSIO (Promise (Array Response))
  76 |   matchAll a = primJS $ Cache.prim__matchAll a undef undef
  77 |
  78 |
  79 |   export
  80 |   match' :
  81 |        {auto 0 _ : JSType t3}
  82 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t3)}
  83 |     -> (obj : Cache)
  84 |     -> (request : HSum [Request, String])
  85 |     -> (options : Optional t3)
  86 |     -> JSIO (Promise (Union2 Response Undefined))
  87 |   match' a b c = primJS $ Cache.prim__match a (toFFI b) (optUp c)
  88 |
  89 |   export
  90 |   match :
  91 |        (obj : Cache)
  92 |     -> (request : HSum [Request, String])
  93 |     -> JSIO (Promise (Union2 Response Undefined))
  94 |   match a b = primJS $ Cache.prim__match a (toFFI b) undef
  95 |
  96 |
  97 |   export
  98 |   put :
  99 |        (obj : Cache)
 100 |     -> (request : HSum [Request, String])
 101 |     -> (response : Response)
 102 |     -> JSIO (Promise Undefined)
 103 |   put a b c = primJS $ Cache.prim__put a (toFFI b) c
 104 |
 105 |
 106 |
 107 | namespace CacheStorage
 108 |
 109 |   export
 110 |   delete :
 111 |        (obj : CacheStorage)
 112 |     -> (cacheName : String)
 113 |     -> JSIO (Promise Boolean)
 114 |   delete a b = primJS $ CacheStorage.prim__delete a b
 115 |
 116 |
 117 |   export
 118 |   has : (obj : CacheStorage) -> (cacheName : String) -> JSIO (Promise Boolean)
 119 |   has a b = primJS $ CacheStorage.prim__has a b
 120 |
 121 |
 122 |   export
 123 |   keys : (obj : CacheStorage) -> JSIO (Promise (Array String))
 124 |   keys a = primJS $ CacheStorage.prim__keys a
 125 |
 126 |
 127 |   export
 128 |   match' :
 129 |        {auto 0 _ : JSType t3}
 130 |     -> {auto 0 _ : Elem MultiCacheQueryOptions (Types t3)}
 131 |     -> (obj : CacheStorage)
 132 |     -> (request : HSum [Request, String])
 133 |     -> (options : Optional t3)
 134 |     -> JSIO (Promise (Union2 Response Undefined))
 135 |   match' a b c = primJS $ CacheStorage.prim__match a (toFFI b) (optUp c)
 136 |
 137 |   export
 138 |   match :
 139 |        (obj : CacheStorage)
 140 |     -> (request : HSum [Request, String])
 141 |     -> JSIO (Promise (Union2 Response Undefined))
 142 |   match a b = primJS $ CacheStorage.prim__match a (toFFI b) undef
 143 |
 144 |
 145 |   export
 146 |   open_ : (obj : CacheStorage) -> (cacheName : String) -> JSIO (Promise Cache)
 147 |   open_ a b = primJS $ CacheStorage.prim__open a b
 148 |
 149 |
 150 |
 151 | namespace Client
 152 |
 153 |   export
 154 |   frameType :
 155 |        {auto 0 _ : JSType t1}
 156 |     -> {auto 0 _ : Elem Client (Types t1)}
 157 |     -> (obj : t1)
 158 |     -> JSIO FrameType
 159 |   frameType a = tryJS "Client.frameType" $ Client.prim__frameType (up a)
 160 |
 161 |
 162 |   export
 163 |   id :
 164 |        {auto 0 _ : JSType t1}
 165 |     -> {auto 0 _ : Elem Client (Types t1)}
 166 |     -> (obj : t1)
 167 |     -> JSIO String
 168 |   id a = primJS $ Client.prim__id (up a)
 169 |
 170 |
 171 |   export
 172 |   type :
 173 |        {auto 0 _ : JSType t1}
 174 |     -> {auto 0 _ : Elem Client (Types t1)}
 175 |     -> (obj : t1)
 176 |     -> JSIO ClientType
 177 |   type a = tryJS "Client.type" $ Client.prim__type (up a)
 178 |
 179 |
 180 |   export
 181 |   url :
 182 |        {auto 0 _ : JSType t1}
 183 |     -> {auto 0 _ : Elem Client (Types t1)}
 184 |     -> (obj : t1)
 185 |     -> JSIO String
 186 |   url a = primJS $ Client.prim__url (up a)
 187 |
 188 |
 189 |   export
 190 |   postMessage :
 191 |        {auto 0 _ : JSType t1}
 192 |     -> {auto 0 _ : Elem Client (Types t1)}
 193 |     -> (obj : t1)
 194 |     -> (message : Any)
 195 |     -> (transfer : Array Object)
 196 |     -> JSIO ()
 197 |   postMessage a b c = primJS $ Client.prim__postMessage (up a) (toFFI b) c
 198 |
 199 |
 200 |   export
 201 |   postMessage1' :
 202 |        {auto 0 _ : JSType t1}
 203 |     -> {auto 0 _ : JSType t3}
 204 |     -> {auto 0 _ : Elem Client (Types t1)}
 205 |     -> {auto 0 _ : Elem PostMessageOptions (Types t3)}
 206 |     -> (obj : t1)
 207 |     -> (message : Any)
 208 |     -> (options : Optional t3)
 209 |     -> JSIO ()
 210 |   postMessage1' a b c = primJS $
 211 |     Client.prim__postMessage1 (up a) (toFFI b) (optUp c)
 212 |
 213 |   export
 214 |   postMessage1 :
 215 |        {auto 0 _ : JSType t1}
 216 |     -> {auto 0 _ : Elem Client (Types t1)}
 217 |     -> (obj : t1)
 218 |     -> (message : Any)
 219 |     -> JSIO ()
 220 |   postMessage1 a b = primJS $ Client.prim__postMessage1 (up a) (toFFI b) undef
 221 |
 222 |
 223 |
 224 | namespace Clients
 225 |
 226 |   export
 227 |   claim : (obj : Clients) -> JSIO (Promise Undefined)
 228 |   claim a = primJS $ Clients.prim__claim a
 229 |
 230 |
 231 |   export
 232 |   get :
 233 |        (obj : Clients)
 234 |     -> (id : String)
 235 |     -> JSIO (Promise (Union2 Client Undefined))
 236 |   get a b = primJS $ Clients.prim__get a b
 237 |
 238 |
 239 |   export
 240 |   matchAll' :
 241 |        {auto 0 _ : JSType t2}
 242 |     -> {auto 0 _ : Elem ClientQueryOptions (Types t2)}
 243 |     -> (obj : Clients)
 244 |     -> (options : Optional t2)
 245 |     -> JSIO (Promise (Array Client))
 246 |   matchAll' a b = primJS $ Clients.prim__matchAll a (optUp b)
 247 |
 248 |   export
 249 |   matchAll : (obj : Clients) -> JSIO (Promise (Array Client))
 250 |   matchAll a = primJS $ Clients.prim__matchAll a undef
 251 |
 252 |
 253 |   export
 254 |   openWindow :
 255 |        (obj : Clients)
 256 |     -> (url : String)
 257 |     -> JSIO (Promise (Nullable WindowClient))
 258 |   openWindow a b = primJS $ Clients.prim__openWindow a b
 259 |
 260 |
 261 |
 262 | namespace ExtendableEvent
 263 |
 264 |   export
 265 |   new' :
 266 |        {auto 0 _ : JSType t2}
 267 |     -> {auto 0 _ : Elem ExtendableEventInit (Types t2)}
 268 |     -> (type : String)
 269 |     -> (eventInitDict : Optional t2)
 270 |     -> JSIO ExtendableEvent
 271 |   new' a b = primJS $ ExtendableEvent.prim__new a (optUp b)
 272 |
 273 |   export
 274 |   new : (type : String) -> JSIO ExtendableEvent
 275 |   new a = primJS $ ExtendableEvent.prim__new a undef
 276 |
 277 |
 278 |   export
 279 |   waitUntil :
 280 |        {auto 0 _ : JSType t1}
 281 |     -> {auto 0 _ : Elem ExtendableEvent (Types t1)}
 282 |     -> (obj : t1)
 283 |     -> (f : Promise AnyPtr)
 284 |     -> JSIO ()
 285 |   waitUntil a b = primJS $ ExtendableEvent.prim__waitUntil (up a) b
 286 |
 287 |
 288 |
 289 | namespace ExtendableMessageEvent
 290 |
 291 |   export
 292 |   new' :
 293 |        {auto 0 _ : JSType t2}
 294 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t2)}
 295 |     -> (type : String)
 296 |     -> (eventInitDict : Optional t2)
 297 |     -> JSIO ExtendableMessageEvent
 298 |   new' a b = primJS $ ExtendableMessageEvent.prim__new a (optUp b)
 299 |
 300 |   export
 301 |   new : (type : String) -> JSIO ExtendableMessageEvent
 302 |   new a = primJS $ ExtendableMessageEvent.prim__new a undef
 303 |
 304 |
 305 |   export
 306 |   data_ : (obj : ExtendableMessageEvent) -> JSIO Any
 307 |   data_ a = tryJS "ExtendableMessageEvent.data_" $
 308 |     ExtendableMessageEvent.prim__data a
 309 |
 310 |
 311 |   export
 312 |   lastEventId : (obj : ExtendableMessageEvent) -> JSIO String
 313 |   lastEventId a = primJS $ ExtendableMessageEvent.prim__lastEventId a
 314 |
 315 |
 316 |   export
 317 |   origin : (obj : ExtendableMessageEvent) -> JSIO String
 318 |   origin a = primJS $ ExtendableMessageEvent.prim__origin a
 319 |
 320 |
 321 |   export
 322 |   ports : (obj : ExtendableMessageEvent) -> JSIO (Array MessagePort)
 323 |   ports a = primJS $ ExtendableMessageEvent.prim__ports a
 324 |
 325 |
 326 |   export
 327 |   source :
 328 |        (obj : ExtendableMessageEvent)
 329 |     -> JSIO (Maybe (HSum [Client, ServiceWorker, MessagePort]))
 330 |   source a = tryJS "ExtendableMessageEvent.source" $
 331 |     ExtendableMessageEvent.prim__source a
 332 |
 333 |
 334 |
 335 | namespace FetchEvent
 336 |
 337 |   export
 338 |   new :
 339 |        {auto 0 _ : JSType t2}
 340 |     -> {auto 0 _ : Elem FetchEventInit (Types t2)}
 341 |     -> (type : String)
 342 |     -> (eventInitDict : t2)
 343 |     -> JSIO FetchEvent
 344 |   new a b = primJS $ FetchEvent.prim__new a (up b)
 345 |
 346 |
 347 |   export
 348 |   clientId : (obj : FetchEvent) -> JSIO String
 349 |   clientId a = primJS $ FetchEvent.prim__clientId a
 350 |
 351 |
 352 |   export
 353 |   handled : (obj : FetchEvent) -> JSIO (Promise Undefined)
 354 |   handled a = primJS $ FetchEvent.prim__handled a
 355 |
 356 |
 357 |   export
 358 |   preloadResponse : (obj : FetchEvent) -> JSIO (Promise AnyPtr)
 359 |   preloadResponse a = primJS $ FetchEvent.prim__preloadResponse a
 360 |
 361 |
 362 |   export
 363 |   replacesClientId : (obj : FetchEvent) -> JSIO String
 364 |   replacesClientId a = primJS $ FetchEvent.prim__replacesClientId a
 365 |
 366 |
 367 |   export
 368 |   request : (obj : FetchEvent) -> JSIO Request
 369 |   request a = primJS $ FetchEvent.prim__request a
 370 |
 371 |
 372 |   export
 373 |   resultingClientId : (obj : FetchEvent) -> JSIO String
 374 |   resultingClientId a = primJS $ FetchEvent.prim__resultingClientId a
 375 |
 376 |
 377 |   export
 378 |   respondWith : (obj : FetchEvent) -> (r : Promise Response) -> JSIO ()
 379 |   respondWith a b = primJS $ FetchEvent.prim__respondWith a b
 380 |
 381 |
 382 |
 383 | namespace NavigationPreloadManager
 384 |
 385 |   export
 386 |   disable : (obj : NavigationPreloadManager) -> JSIO (Promise Undefined)
 387 |   disable a = primJS $ NavigationPreloadManager.prim__disable a
 388 |
 389 |
 390 |   export
 391 |   enable : (obj : NavigationPreloadManager) -> JSIO (Promise Undefined)
 392 |   enable a = primJS $ NavigationPreloadManager.prim__enable a
 393 |
 394 |
 395 |   export
 396 |   getState :
 397 |        (obj : NavigationPreloadManager)
 398 |     -> JSIO (Promise NavigationPreloadState)
 399 |   getState a = primJS $ NavigationPreloadManager.prim__getState a
 400 |
 401 |
 402 |   export
 403 |   setHeaderValue :
 404 |        (obj : NavigationPreloadManager)
 405 |     -> (value : ByteString)
 406 |     -> JSIO (Promise Undefined)
 407 |   setHeaderValue a b = primJS $
 408 |     NavigationPreloadManager.prim__setHeaderValue a b
 409 |
 410 |
 411 |
 412 | namespace ServiceWorker
 413 |
 414 |   export
 415 |   onstatechange : ServiceWorker -> Attribute False Maybe EventHandlerNonNull
 416 |   onstatechange v = fromNullablePrim
 417 |                       "ServiceWorker.getonstatechange"
 418 |                       prim__onstatechange
 419 |                       prim__setOnstatechange
 420 |                       v
 421 |
 422 |
 423 |   export
 424 |   scriptURL : (obj : ServiceWorker) -> JSIO String
 425 |   scriptURL a = primJS $ ServiceWorker.prim__scriptURL a
 426 |
 427 |
 428 |   export
 429 |   state : (obj : ServiceWorker) -> JSIO ServiceWorkerState
 430 |   state a = tryJS "ServiceWorker.state" $ ServiceWorker.prim__state a
 431 |
 432 |
 433 |   export
 434 |   postMessage :
 435 |        (obj : ServiceWorker)
 436 |     -> (message : Any)
 437 |     -> (transfer : Array Object)
 438 |     -> JSIO ()
 439 |   postMessage a b c = primJS $ ServiceWorker.prim__postMessage a (toFFI b) c
 440 |
 441 |
 442 |   export
 443 |   postMessage1' :
 444 |        {auto 0 _ : JSType t3}
 445 |     -> {auto 0 _ : Elem PostMessageOptions (Types t3)}
 446 |     -> (obj : ServiceWorker)
 447 |     -> (message : Any)
 448 |     -> (options : Optional t3)
 449 |     -> JSIO ()
 450 |   postMessage1' a b c = primJS $
 451 |     ServiceWorker.prim__postMessage1 a (toFFI b) (optUp c)
 452 |
 453 |   export
 454 |   postMessage1 : (obj : ServiceWorker) -> (message : Any) -> JSIO ()
 455 |   postMessage1 a b = primJS $ ServiceWorker.prim__postMessage1 a (toFFI b) undef
 456 |
 457 |
 458 |
 459 | namespace ServiceWorkerContainer
 460 |
 461 |   export
 462 |   controller : (obj : ServiceWorkerContainer) -> JSIO (Maybe ServiceWorker)
 463 |   controller a = tryJS "ServiceWorkerContainer.controller" $
 464 |     ServiceWorkerContainer.prim__controller a
 465 |
 466 |
 467 |   export
 468 |   oncontrollerchange :
 469 |        ServiceWorkerContainer
 470 |     -> Attribute False Maybe EventHandlerNonNull
 471 |   oncontrollerchange v = fromNullablePrim
 472 |                            "ServiceWorkerContainer.getoncontrollerchange"
 473 |                            prim__oncontrollerchange
 474 |                            prim__setOncontrollerchange
 475 |                            v
 476 |
 477 |
 478 |   export
 479 |   onmessage :
 480 |        ServiceWorkerContainer
 481 |     -> Attribute False Maybe EventHandlerNonNull
 482 |   onmessage v = fromNullablePrim
 483 |                   "ServiceWorkerContainer.getonmessage"
 484 |                   prim__onmessage
 485 |                   prim__setOnmessage
 486 |                   v
 487 |
 488 |
 489 |   export
 490 |   onmessageerror :
 491 |        ServiceWorkerContainer
 492 |     -> Attribute False Maybe EventHandlerNonNull
 493 |   onmessageerror v = fromNullablePrim
 494 |                        "ServiceWorkerContainer.getonmessageerror"
 495 |                        prim__onmessageerror
 496 |                        prim__setOnmessageerror
 497 |                        v
 498 |
 499 |
 500 |   export
 501 |   ready :
 502 |        (obj : ServiceWorkerContainer)
 503 |     -> JSIO (Promise ServiceWorkerRegistration)
 504 |   ready a = primJS $ ServiceWorkerContainer.prim__ready a
 505 |
 506 |
 507 |   export
 508 |   getRegistration' :
 509 |        (obj : ServiceWorkerContainer)
 510 |     -> (clientURL : Optional String)
 511 |     -> JSIO (Promise (Union2 ServiceWorkerRegistration Undefined))
 512 |   getRegistration' a b = primJS $
 513 |     ServiceWorkerContainer.prim__getRegistration a (toFFI b)
 514 |
 515 |   export
 516 |   getRegistration :
 517 |        (obj : ServiceWorkerContainer)
 518 |     -> JSIO (Promise (Union2 ServiceWorkerRegistration Undefined))
 519 |   getRegistration a = primJS $
 520 |     ServiceWorkerContainer.prim__getRegistration a undef
 521 |
 522 |
 523 |   export
 524 |   getRegistrations :
 525 |        (obj : ServiceWorkerContainer)
 526 |     -> JSIO (Promise (Array ServiceWorkerRegistration))
 527 |   getRegistrations a = primJS $ ServiceWorkerContainer.prim__getRegistrations a
 528 |
 529 |
 530 |   export
 531 |   register' :
 532 |        {auto 0 _ : JSType t3}
 533 |     -> {auto 0 _ : Elem RegistrationOptions (Types t3)}
 534 |     -> (obj : ServiceWorkerContainer)
 535 |     -> (scriptURL : String)
 536 |     -> (options : Optional t3)
 537 |     -> JSIO (Promise ServiceWorkerRegistration)
 538 |   register' a b c = primJS $ ServiceWorkerContainer.prim__register a b (optUp c)
 539 |
 540 |   export
 541 |   register :
 542 |        (obj : ServiceWorkerContainer)
 543 |     -> (scriptURL : String)
 544 |     -> JSIO (Promise ServiceWorkerRegistration)
 545 |   register a b = primJS $ ServiceWorkerContainer.prim__register a b undef
 546 |
 547 |
 548 |   export
 549 |   startMessages : (obj : ServiceWorkerContainer) -> JSIO ()
 550 |   startMessages a = primJS $ ServiceWorkerContainer.prim__startMessages a
 551 |
 552 |
 553 |
 554 | namespace ServiceWorkerGlobalScope
 555 |
 556 |   export
 557 |   clients : (obj : ServiceWorkerGlobalScope) -> JSIO Clients
 558 |   clients a = primJS $ ServiceWorkerGlobalScope.prim__clients a
 559 |
 560 |
 561 |   export
 562 |   onactivate :
 563 |        ServiceWorkerGlobalScope
 564 |     -> Attribute False Maybe EventHandlerNonNull
 565 |   onactivate v = fromNullablePrim
 566 |                    "ServiceWorkerGlobalScope.getonactivate"
 567 |                    prim__onactivate
 568 |                    prim__setOnactivate
 569 |                    v
 570 |
 571 |
 572 |   export
 573 |   onfetch :
 574 |        ServiceWorkerGlobalScope
 575 |     -> Attribute False Maybe EventHandlerNonNull
 576 |   onfetch v = fromNullablePrim
 577 |                 "ServiceWorkerGlobalScope.getonfetch"
 578 |                 prim__onfetch
 579 |                 prim__setOnfetch
 580 |                 v
 581 |
 582 |
 583 |   export
 584 |   oninstall :
 585 |        ServiceWorkerGlobalScope
 586 |     -> Attribute False Maybe EventHandlerNonNull
 587 |   oninstall v = fromNullablePrim
 588 |                   "ServiceWorkerGlobalScope.getoninstall"
 589 |                   prim__oninstall
 590 |                   prim__setOninstall
 591 |                   v
 592 |
 593 |
 594 |   export
 595 |   onmessage :
 596 |        ServiceWorkerGlobalScope
 597 |     -> Attribute False Maybe EventHandlerNonNull
 598 |   onmessage v = fromNullablePrim
 599 |                   "ServiceWorkerGlobalScope.getonmessage"
 600 |                   prim__onmessage
 601 |                   prim__setOnmessage
 602 |                   v
 603 |
 604 |
 605 |   export
 606 |   onmessageerror :
 607 |        ServiceWorkerGlobalScope
 608 |     -> Attribute False Maybe EventHandlerNonNull
 609 |   onmessageerror v = fromNullablePrim
 610 |                        "ServiceWorkerGlobalScope.getonmessageerror"
 611 |                        prim__onmessageerror
 612 |                        prim__setOnmessageerror
 613 |                        v
 614 |
 615 |
 616 |   export
 617 |   registration :
 618 |        (obj : ServiceWorkerGlobalScope)
 619 |     -> JSIO ServiceWorkerRegistration
 620 |   registration a = primJS $ ServiceWorkerGlobalScope.prim__registration a
 621 |
 622 |
 623 |   export
 624 |   serviceWorker : (obj : ServiceWorkerGlobalScope) -> JSIO ServiceWorker
 625 |   serviceWorker a = primJS $ ServiceWorkerGlobalScope.prim__serviceWorker a
 626 |
 627 |
 628 |   export
 629 |   skipWaiting : (obj : ServiceWorkerGlobalScope) -> JSIO (Promise Undefined)
 630 |   skipWaiting a = primJS $ ServiceWorkerGlobalScope.prim__skipWaiting a
 631 |
 632 |
 633 |
 634 | namespace ServiceWorkerRegistration
 635 |
 636 |   export
 637 |   active : (obj : ServiceWorkerRegistration) -> JSIO (Maybe ServiceWorker)
 638 |   active a = tryJS "ServiceWorkerRegistration.active" $
 639 |     ServiceWorkerRegistration.prim__active a
 640 |
 641 |
 642 |   export
 643 |   installing : (obj : ServiceWorkerRegistration) -> JSIO (Maybe ServiceWorker)
 644 |   installing a = tryJS "ServiceWorkerRegistration.installing" $
 645 |     ServiceWorkerRegistration.prim__installing a
 646 |
 647 |
 648 |   export
 649 |   navigationPreload :
 650 |        (obj : ServiceWorkerRegistration)
 651 |     -> JSIO NavigationPreloadManager
 652 |   navigationPreload a = primJS $
 653 |     ServiceWorkerRegistration.prim__navigationPreload a
 654 |
 655 |
 656 |   export
 657 |   onupdatefound :
 658 |        ServiceWorkerRegistration
 659 |     -> Attribute False Maybe EventHandlerNonNull
 660 |   onupdatefound v = fromNullablePrim
 661 |                       "ServiceWorkerRegistration.getonupdatefound"
 662 |                       prim__onupdatefound
 663 |                       prim__setOnupdatefound
 664 |                       v
 665 |
 666 |
 667 |   export
 668 |   scope : (obj : ServiceWorkerRegistration) -> JSIO String
 669 |   scope a = primJS $ ServiceWorkerRegistration.prim__scope a
 670 |
 671 |
 672 |   export
 673 |   updateViaCache :
 674 |        (obj : ServiceWorkerRegistration)
 675 |     -> JSIO ServiceWorkerUpdateViaCache
 676 |   updateViaCache a = tryJS "ServiceWorkerRegistration.updateViaCache" $
 677 |     ServiceWorkerRegistration.prim__updateViaCache a
 678 |
 679 |
 680 |   export
 681 |   waiting : (obj : ServiceWorkerRegistration) -> JSIO (Maybe ServiceWorker)
 682 |   waiting a = tryJS "ServiceWorkerRegistration.waiting" $
 683 |     ServiceWorkerRegistration.prim__waiting a
 684 |
 685 |
 686 |   export
 687 |   unregister : (obj : ServiceWorkerRegistration) -> JSIO (Promise Boolean)
 688 |   unregister a = primJS $ ServiceWorkerRegistration.prim__unregister a
 689 |
 690 |
 691 |   export
 692 |   update : (obj : ServiceWorkerRegistration) -> JSIO (Promise Undefined)
 693 |   update a = primJS $ ServiceWorkerRegistration.prim__update a
 694 |
 695 |
 696 |
 697 | namespace WindowClient
 698 |
 699 |   export
 700 |   ancestorOrigins : (obj : WindowClient) -> JSIO (Array String)
 701 |   ancestorOrigins a = primJS $ WindowClient.prim__ancestorOrigins a
 702 |
 703 |
 704 |   export
 705 |   focused : (obj : WindowClient) -> JSIO Bool
 706 |   focused a = tryJS "WindowClient.focused" $ WindowClient.prim__focused a
 707 |
 708 |
 709 |   export
 710 |   visibilityState : (obj : WindowClient) -> JSIO VisibilityState
 711 |   visibilityState a = tryJS "WindowClient.visibilityState" $
 712 |     WindowClient.prim__visibilityState a
 713 |
 714 |
 715 |   export
 716 |   focus : (obj : WindowClient) -> JSIO (Promise WindowClient)
 717 |   focus a = primJS $ WindowClient.prim__focus a
 718 |
 719 |
 720 |   export
 721 |   navigate :
 722 |        (obj : WindowClient)
 723 |     -> (url : String)
 724 |     -> JSIO (Promise (Nullable WindowClient))
 725 |   navigate a b = primJS $ WindowClient.prim__navigate a b
 726 |
 727 |
 728 |
 729 |
 730 |
 731 | --------------------------------------------------------------------------------
 732 | --          Dictionaries
 733 | --------------------------------------------------------------------------------
 734 |
 735 | namespace CacheQueryOptions
 736 |
 737 |   export
 738 |   new' :
 739 |        (ignoreSearch : Optional Bool)
 740 |     -> (ignoreMethod : Optional Bool)
 741 |     -> (ignoreVary : Optional Bool)
 742 |     -> JSIO CacheQueryOptions
 743 |   new' a b c = primJS $
 744 |     CacheQueryOptions.prim__new (toFFI a) (toFFI b) (toFFI c)
 745 |
 746 |   export
 747 |   new : JSIO CacheQueryOptions
 748 |   new = primJS $ CacheQueryOptions.prim__new undef undef undef
 749 |
 750 |
 751 |   export
 752 |   ignoreMethod :
 753 |        {auto 0 _ : JSType t}
 754 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t)}
 755 |     -> t
 756 |     -> Attribute True Optional Bool
 757 |   ignoreMethod v = fromUndefOrPrim
 758 |                      "CacheQueryOptions.getignoreMethod"
 759 |                      prim__ignoreMethod
 760 |                      prim__setIgnoreMethod
 761 |                      False
 762 |                      (v :> CacheQueryOptions)
 763 |
 764 |
 765 |   export
 766 |   ignoreSearch :
 767 |        {auto 0 _ : JSType t}
 768 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t)}
 769 |     -> t
 770 |     -> Attribute True Optional Bool
 771 |   ignoreSearch v = fromUndefOrPrim
 772 |                      "CacheQueryOptions.getignoreSearch"
 773 |                      prim__ignoreSearch
 774 |                      prim__setIgnoreSearch
 775 |                      False
 776 |                      (v :> CacheQueryOptions)
 777 |
 778 |
 779 |   export
 780 |   ignoreVary :
 781 |        {auto 0 _ : JSType t}
 782 |     -> {auto 0 _ : Elem CacheQueryOptions (Types t)}
 783 |     -> t
 784 |     -> Attribute True Optional Bool
 785 |   ignoreVary v = fromUndefOrPrim
 786 |                    "CacheQueryOptions.getignoreVary"
 787 |                    prim__ignoreVary
 788 |                    prim__setIgnoreVary
 789 |                    False
 790 |                    (v :> CacheQueryOptions)
 791 |
 792 |
 793 |
 794 | namespace ClientQueryOptions
 795 |
 796 |   export
 797 |   new' :
 798 |        (includeUncontrolled : Optional Bool)
 799 |     -> (type : Optional ClientType)
 800 |     -> JSIO ClientQueryOptions
 801 |   new' a b = primJS $ ClientQueryOptions.prim__new (toFFI a) (toFFI b)
 802 |
 803 |   export
 804 |   new : JSIO ClientQueryOptions
 805 |   new = primJS $ ClientQueryOptions.prim__new undef undef
 806 |
 807 |
 808 |   export
 809 |   includeUncontrolled :
 810 |        {auto 0 _ : JSType t}
 811 |     -> {auto 0 _ : Elem ClientQueryOptions (Types t)}
 812 |     -> t
 813 |     -> Attribute True Optional Bool
 814 |   includeUncontrolled v = fromUndefOrPrim
 815 |                             "ClientQueryOptions.getincludeUncontrolled"
 816 |                             prim__includeUncontrolled
 817 |                             prim__setIncludeUncontrolled
 818 |                             False
 819 |                             (v :> ClientQueryOptions)
 820 |
 821 |
 822 |   export
 823 |   type :
 824 |        {auto 0 _ : JSType t}
 825 |     -> {auto 0 _ : Elem ClientQueryOptions (Types t)}
 826 |     -> t
 827 |     -> Attribute False Optional ClientType
 828 |   type v = fromUndefOrPrimNoDefault
 829 |              "ClientQueryOptions.gettype"
 830 |              prim__type
 831 |              prim__setType
 832 |              (v :> ClientQueryOptions)
 833 |
 834 |
 835 |
 836 | namespace ExtendableEventInit
 837 |
 838 |   export
 839 |   new : JSIO ExtendableEventInit
 840 |   new = primJS $ ExtendableEventInit.prim__new
 841 |
 842 |
 843 |
 844 | namespace ExtendableMessageEventInit
 845 |
 846 |   export
 847 |   new' :
 848 |        (data_ : Optional Any)
 849 |     -> (origin : Optional String)
 850 |     -> (lastEventId : Optional String)
 851 |     -> (source : Optional (Maybe (HSum [Client, ServiceWorker, MessagePort])))
 852 |     -> (ports : Optional (Array MessagePort))
 853 |     -> JSIO ExtendableMessageEventInit
 854 |   new' a b c d e = primJS $
 855 |     ExtendableMessageEventInit.prim__new
 856 |       (toFFI a)
 857 |       (toFFI b)
 858 |       (toFFI c)
 859 |       (toFFI d)
 860 |       (toFFI e)
 861 |
 862 |   export
 863 |   new : JSIO ExtendableMessageEventInit
 864 |   new = primJS $
 865 |     ExtendableMessageEventInit.prim__new undef undef undef undef undef
 866 |
 867 |
 868 |   export
 869 |   data_ :
 870 |        {auto 0 _ : JSType t}
 871 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t)}
 872 |     -> t
 873 |     -> Attribute True Optional Any
 874 |   data_ v = fromUndefOrPrim
 875 |               "ExtendableMessageEventInit.getdata"
 876 |               prim__data
 877 |               prim__setData
 878 |               (MkAny $ null {a = ()})
 879 |               (v :> ExtendableMessageEventInit)
 880 |
 881 |
 882 |   export
 883 |   lastEventId :
 884 |        {auto 0 _ : JSType t}
 885 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t)}
 886 |     -> t
 887 |     -> Attribute True Optional String
 888 |   lastEventId v = fromUndefOrPrim
 889 |                     "ExtendableMessageEventInit.getlastEventId"
 890 |                     prim__lastEventId
 891 |                     prim__setLastEventId
 892 |                     ""
 893 |                     (v :> ExtendableMessageEventInit)
 894 |
 895 |
 896 |   export
 897 |   origin :
 898 |        {auto 0 _ : JSType t}
 899 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t)}
 900 |     -> t
 901 |     -> Attribute True Optional String
 902 |   origin v = fromUndefOrPrim
 903 |                "ExtendableMessageEventInit.getorigin"
 904 |                prim__origin
 905 |                prim__setOrigin
 906 |                ""
 907 |                (v :> ExtendableMessageEventInit)
 908 |
 909 |
 910 |   export
 911 |   ports :
 912 |        {auto 0 _ : JSType t}
 913 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t)}
 914 |     -> t
 915 |     -> Attribute False Optional (Array MessagePort)
 916 |   ports v = fromUndefOrPrimNoDefault
 917 |               "ExtendableMessageEventInit.getports"
 918 |               prim__ports
 919 |               prim__setPorts
 920 |               (v :> ExtendableMessageEventInit)
 921 |
 922 |
 923 |   export
 924 |   source :
 925 |        {auto 0 _ : JSType t}
 926 |     -> {auto 0 _ : Elem ExtendableMessageEventInit (Types t)}
 927 |     -> t
 928 |     -> Attribute True Optional (Maybe
 929 |                                   (HSum [Client, ServiceWorker, MessagePort]))
 930 |   source v = fromUndefOrPrim
 931 |                "ExtendableMessageEventInit.getsource"
 932 |                prim__source
 933 |                prim__setSource
 934 |                Nothing
 935 |                (v :> ExtendableMessageEventInit)
 936 |
 937 |
 938 |
 939 | namespace FetchEventInit
 940 |
 941 |   export
 942 |   new' :
 943 |        (request : Request)
 944 |     -> (preloadResponse : Optional (Promise AnyPtr))
 945 |     -> (clientId : Optional String)
 946 |     -> (resultingClientId : Optional String)
 947 |     -> (replacesClientId : Optional String)
 948 |     -> (handled : Optional (Promise Undefined))
 949 |     -> JSIO FetchEventInit
 950 |   new' a b c d e f = primJS $
 951 |     FetchEventInit.prim__new a (toFFI b) (toFFI c) (toFFI d) (toFFI e) (toFFI f)
 952 |
 953 |   export
 954 |   new : (request : Request) -> JSIO FetchEventInit
 955 |   new a = primJS $ FetchEventInit.prim__new a undef undef undef undef undef
 956 |
 957 |
 958 |   export
 959 |   clientId :
 960 |        {auto 0 _ : JSType t}
 961 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
 962 |     -> t
 963 |     -> Attribute True Optional String
 964 |   clientId v = fromUndefOrPrim
 965 |                  "FetchEventInit.getclientId"
 966 |                  prim__clientId
 967 |                  prim__setClientId
 968 |                  ""
 969 |                  (v :> FetchEventInit)
 970 |
 971 |
 972 |   export
 973 |   handled :
 974 |        {auto 0 _ : JSType t}
 975 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
 976 |     -> t
 977 |     -> Attribute False Optional (Promise Undefined)
 978 |   handled v = fromUndefOrPrimNoDefault
 979 |                 "FetchEventInit.gethandled"
 980 |                 prim__handled
 981 |                 prim__setHandled
 982 |                 (v :> FetchEventInit)
 983 |
 984 |
 985 |   export
 986 |   preloadResponse :
 987 |        {auto 0 _ : JSType t}
 988 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
 989 |     -> t
 990 |     -> Attribute False Optional (Promise AnyPtr)
 991 |   preloadResponse v = fromUndefOrPrimNoDefault
 992 |                         "FetchEventInit.getpreloadResponse"
 993 |                         prim__preloadResponse
 994 |                         prim__setPreloadResponse
 995 |                         (v :> FetchEventInit)
 996 |
 997 |
 998 |   export
 999 |   replacesClientId :
1000 |        {auto 0 _ : JSType t}
1001 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
1002 |     -> t
1003 |     -> Attribute True Optional String
1004 |   replacesClientId v = fromUndefOrPrim
1005 |                          "FetchEventInit.getreplacesClientId"
1006 |                          prim__replacesClientId
1007 |                          prim__setReplacesClientId
1008 |                          ""
1009 |                          (v :> FetchEventInit)
1010 |
1011 |
1012 |   export
1013 |   request :
1014 |        {auto 0 _ : JSType t}
1015 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
1016 |     -> t
1017 |     -> Attribute True Prelude.id Request
1018 |   request v = fromPrim
1019 |                 "FetchEventInit.getrequest"
1020 |                 prim__request
1021 |                 prim__setRequest
1022 |                 (v :> FetchEventInit)
1023 |
1024 |
1025 |   export
1026 |   resultingClientId :
1027 |        {auto 0 _ : JSType t}
1028 |     -> {auto 0 _ : Elem FetchEventInit (Types t)}
1029 |     -> t
1030 |     -> Attribute True Optional String
1031 |   resultingClientId v = fromUndefOrPrim
1032 |                           "FetchEventInit.getresultingClientId"
1033 |                           prim__resultingClientId
1034 |                           prim__setResultingClientId
1035 |                           ""
1036 |                           (v :> FetchEventInit)
1037 |
1038 |
1039 |
1040 | namespace MultiCacheQueryOptions
1041 |
1042 |   export
1043 |   new' : (cacheName : Optional String) -> JSIO MultiCacheQueryOptions
1044 |   new' a = primJS $ MultiCacheQueryOptions.prim__new (toFFI a)
1045 |
1046 |   export
1047 |   new : JSIO MultiCacheQueryOptions
1048 |   new = primJS $ MultiCacheQueryOptions.prim__new undef
1049 |
1050 |
1051 |   export
1052 |   cacheName :
1053 |        {auto 0 _ : JSType t}
1054 |     -> {auto 0 _ : Elem MultiCacheQueryOptions (Types t)}
1055 |     -> t
1056 |     -> Attribute False Optional String
1057 |   cacheName v = fromUndefOrPrimNoDefault
1058 |                   "MultiCacheQueryOptions.getcacheName"
1059 |                   prim__cacheName
1060 |                   prim__setCacheName
1061 |                   (v :> MultiCacheQueryOptions)
1062 |
1063 |
1064 |
1065 | namespace NavigationPreloadState
1066 |
1067 |   export
1068 |   new' :
1069 |        (enabled : Optional Bool)
1070 |     -> (headerValue : Optional ByteString)
1071 |     -> JSIO NavigationPreloadState
1072 |   new' a b = primJS $ NavigationPreloadState.prim__new (toFFI a) (toFFI b)
1073 |
1074 |   export
1075 |   new : JSIO NavigationPreloadState
1076 |   new = primJS $ NavigationPreloadState.prim__new undef undef
1077 |
1078 |
1079 |   export
1080 |   enabled :
1081 |        {auto 0 _ : JSType t}
1082 |     -> {auto 0 _ : Elem NavigationPreloadState (Types t)}
1083 |     -> t
1084 |     -> Attribute True Optional Bool
1085 |   enabled v = fromUndefOrPrim
1086 |                 "NavigationPreloadState.getenabled"
1087 |                 prim__enabled
1088 |                 prim__setEnabled
1089 |                 False
1090 |                 (v :> NavigationPreloadState)
1091 |
1092 |
1093 |   export
1094 |   headerValue :
1095 |        {auto 0 _ : JSType t}
1096 |     -> {auto 0 _ : Elem NavigationPreloadState (Types t)}
1097 |     -> t
1098 |     -> Attribute False Optional ByteString
1099 |   headerValue v = fromUndefOrPrimNoDefault
1100 |                     "NavigationPreloadState.getheaderValue"
1101 |                     prim__headerValue
1102 |                     prim__setHeaderValue
1103 |                     (v :> NavigationPreloadState)
1104 |
1105 |
1106 |
1107 | namespace RegistrationOptions
1108 |
1109 |   export
1110 |   new' :
1111 |        (scope : Optional String)
1112 |     -> (type : Optional WorkerType)
1113 |     -> (updateViaCache : Optional ServiceWorkerUpdateViaCache)
1114 |     -> JSIO RegistrationOptions
1115 |   new' a b c = primJS $
1116 |     RegistrationOptions.prim__new (toFFI a) (toFFI b) (toFFI c)
1117 |
1118 |   export
1119 |   new : JSIO RegistrationOptions
1120 |   new = primJS $ RegistrationOptions.prim__new undef undef undef
1121 |
1122 |
1123 |   export
1124 |   scope :
1125 |        {auto 0 _ : JSType t}
1126 |     -> {auto 0 _ : Elem RegistrationOptions (Types t)}
1127 |     -> t
1128 |     -> Attribute False Optional String
1129 |   scope v = fromUndefOrPrimNoDefault
1130 |               "RegistrationOptions.getscope"
1131 |               prim__scope
1132 |               prim__setScope
1133 |               (v :> RegistrationOptions)
1134 |
1135 |
1136 |   export
1137 |   type :
1138 |        {auto 0 _ : JSType t}
1139 |     -> {auto 0 _ : Elem RegistrationOptions (Types t)}
1140 |     -> t
1141 |     -> Attribute False Optional WorkerType
1142 |   type v = fromUndefOrPrimNoDefault
1143 |              "RegistrationOptions.gettype"
1144 |              prim__type
1145 |              prim__setType
1146 |              (v :> RegistrationOptions)
1147 |
1148 |
1149 |   export
1150 |   updateViaCache :
1151 |        {auto 0 _ : JSType t}
1152 |     -> {auto 0 _ : Elem RegistrationOptions (Types t)}
1153 |     -> t
1154 |     -> Attribute False Optional ServiceWorkerUpdateViaCache
1155 |   updateViaCache v = fromUndefOrPrimNoDefault
1156 |                        "RegistrationOptions.getupdateViaCache"
1157 |                        prim__updateViaCache
1158 |                        prim__setUpdateViaCache
1159 |                        (v :> RegistrationOptions)
1160 |