losfair/blueboat

Tracking issue for JavaScript API

losfair opened this issue · 0 comments

The entire TypeScript API definition is published as the blueboat-types package. This issue tracks the API surface on a high level:

Tier 1

Tier 1 APIs are stable interfaces exposed by Blueboat. Incompatible changes require a semver major.

  • Standard JavaScript features supported by V8
  • A subset of the Web platform API
    • fetch(), Request and Response objects
    • TextEncoder, TextDecoder
    • Timers
      • setTimeout, clearTimeout
      • setInterval, clearInterval
    • URL, URLSearchParams
    • crypto.getRandomValues
    • crypto.randomUUID
    • crypto.subtle (NativeCrypto can be used instead)
    • console
      • console.log()
      • console.warn()
      • console.error()
  • Request router
    • The Router object
  • Cryptography extensions
    • Ed25519 and X25519: NativeCrypto.Ed25519, NativeCrypto.X25519
    • JWT signing and verification: NativeCrypto.JWT
    • Hashing: NativeCrypto.digest
    • Constant time comparison: NativeCrypto.constantTimeEq
    • AEAD: NativeCrypto.AEAD
      • AES128-GCM-SIV: NativeCrypto.AEAD.{aes128GcmSivEncrypt,aes128GcmSivDecrypt}
    • HMAC: NativeCrypto.HMAC
      • HMAC-SHA256: NativeCrypto.HMAC.hmacSha256
  • Template API
    • Tera template rendering: Template.render()
  • Encoding and decoding
    • Codec.hexencode(), Codec.hexdecode()
    • Codec.b64encode(), Codec.b64decode()
  • Embedded datasets
    • MIME type guessing: Dataset.Mime.guessByExt()
  • Text utilities
    • YAML serialization and deserialization: TextUtil.Yaml.parse(), TextUtil.Yaml.stringify()
    • Markdown rendering: TextUtil.Markdown.renderToHtml()
  • Data compression
    • Zstd
      • Block compression: Compress.Zstd.blockCompress
      • Block decompression: Compress.Zstd.blockDecompress

Tier 2

Tier 2 APIs are experimental - incompatible changes can be made within a major version.

  • Graphics API
    • Canvas (Graphics.Canvas)
    • Layout constraint solver based on Z3 (Graphics.Layout)
  • Background tasks
    • Background.atMostOnce()
    • Background.atLeastOnce()
    • Background.delayed()
  • Data validation
    • JSON Type Definition validation: Validation.JTD
  • Native API to external services
    • MySQL client
    • Apple Push Notification Service (APNS) client
    • AWS
      • v4 request signing: ExternalService.AWS.sign
      • Presigned URL: ExternalService.AWS.getPresignedUrl
    • GitHub
  • DOM API
    • XML: TextUtil.DOM.HTML
    • HTML: TextUtil.DOM.XML
  • Distributed system primitives
    • Key-value store
      • KV.Namespace
    • Message queue
      • App.pubsub
      • Client-side API: /_blueboat/events
  • Encoding and decoding
    • multipart/form-data parser: Codec.Multipart.decode