@fkn/lib/cloud
Type Aliases
Section titled “Type Aliases”CloudPermissionRequest
Section titled “CloudPermissionRequest”type CloudPermissionRequest = CategoryRequest & object;One upfront permission category ask on the cloud backend, naming the sites the grant applies to.
Type Declaration
Section titled “Type Declaration”hosts: string[];QuotaStatus
Section titled “QuotaStatus”type QuotaStatus = object;Properties
Section titled “Properties”bitsPerSecond
Section titled “bitsPerSecond”bitsPerSecond: number;current effective egress rate cap, bits per second (for display)
bytesPerSecond
Section titled “bytesPerSecond”bytesPerSecond: number;current effective egress rate cap, bytes per second
limitBytes
Section titled “limitBytes”limitBytes: number;free-tier daily volume before throttling kicks in
overQuota
Section titled “overQuota”overQuota: boolean;today’s free-tier volume is spent (true even for premium, see throttled)
premium
Section titled “premium”premium: boolean;the user has a paid subscription, throttle never applies
remainingBytes
Section titled “remainingBytes”remainingBytes: number;bytes of free-tier volume left today
throttled
Section titled “throttled”throttled: boolean;transfers are actually being rate-limited right now (overQuota and not premium)
usedBytes
Section titled “usedBytes”usedBytes: number;bytes egressed through FKN relays today (per connected account or anonymized IP), saturates at limitBytes: consumption past the free-tier volume is private and never reported
Variables
Section titled “Variables”attachFrame
Section titled “attachFrame”const attachFrame: AttachFrameFunction;Attaches the render proxy to an iframe the app mounted, or opens it in a window of its own with
{ window }. A window opens before the first await, so call this directly in a click handler.
Serves cookies: 'persistent', the default, and 'ephemeral'; 'native', the browser’s own
cookies, is a TypeError before anything is attached or opened (AttachCookies).
permissions
Section titled “permissions”const permissions: object;Type Declaration
Section titled “Type Declaration”request
Section titled “request”request: (requests) => Promise<CategoryAnswer[]>;Asks the FKN cloud consent card for upfront permissions across one or more target host groups, answering one grant per request in request order.
Parameters
Section titled “Parameters”requests
Section titled “requests”readonly CloudPermissionRequest[]
Returns
Section titled “Returns”Promise<CategoryAnswer[]>
Functions
Section titled “Functions”available()
Section titled “available()”function available(): boolean;Returns
Section titled “Returns”boolean
quota()
Section titled “quota()”function quota(): Promise<QuotaStatus>;Returns
Section titled “Returns”References
Section titled “References”Re-exports dgram
Re-exports dns
Re-exports fetch
Renames and re-exports cloud/fs
Re-exports http
Re-exports net