Capabilities Schema

Version 0.10.0

JSON-Schema

This document was generated from a JSON-Schema, and is intended to provide a human readable overview and examples of the methods contained in the module.

For the full schema, see the link below.

Schema
capabilities.json

Table of Contents

Schemas

GrantPolicy

type GrantPolicy = {
  options: object[]
  scope: 'app' | 'device'
  lifespan: 'once' | 'forever' | 'appActive' | 'powerActive' | 'seconds'
  lifespanTtl?: number
  privacySetting: {
    property: string                                                      // The Firebolt <Module>.<getter> RPC method name for a property
    allowValue: boolean                                                   // The value for the property to be in the most permissive state, i.e. granted.
    autoGrantIfAllowed: boolean                                           // Whether to skip all GrantRequirement steps if the property is set to the 'allow value'.
    revokeGrantsOnDeny: boolean                                           // Whether grants made from this policy will be revoked if/when the property is ever set to the deny value.
    updateProperty: boolean                                               // Whether to update the property value to match the grant.
  }
  overridable: boolean

}
Examples

PrivacySetting

type PrivacySetting = {
  property: string             // The Firebolt <Module>.<getter> RPC method name for a property
  allowValue: boolean          // The value for the property to be in the most permissive state, i.e. granted.
  autoGrantIfAllowed: boolean  // Whether to skip all GrantRequirement steps if the property is set to the 'allow value'.
  revokeGrantsOnDeny: boolean  // Whether grants made from this policy will be revoked if/when the property is ever set to the deny value.
  updateProperty: boolean      // Whether to update the property value to match the grant.
}
Examples

GrantRequirements

type GrantRequirements = {
  steps: object[]
}
Examples

GrantStep

type GrantStep = {
  capability: true   // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.
  configuration?: {
  }
}
Examples

GrantKey

type GrantKey = string

See also:

Examples

Capability

type Capability = string
Examples

Details

A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.


Role

type Role = 'use' | 'manage' | 'provide'
Examples

Details

Role provides access level for the app for a given capability.


Permission

type Permission = {
  role?: Role          // Role provides access level for the app for a given capability.
  capability?: string  // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.
}
Examples

Details

A Capability combined with a Role, which an app may be permitted (by a distributor) or granted (by an end user).


DenyReason

type DenyReason = 'unpermitted' | 'unsupported' | 'disabled' | 'unavailable' | 'grantDenied' | 'ungranted'
Examples

Details

Reasons why a Capability might not be invokable


CapPermissionStatus

type CapPermissionStatus = {
  permitted?: boolean         // Provides info whether the capability is permitted
  granted?: boolean           // Provides info whether the capability is granted
}
Examples

CapabilityInfo

type CapabilityInfo = {
  capability?: string     // A Capability is a discrete unit of functionality that a Firebolt device might be able to perform.
  supported: boolean      // Provides info whether the capability is supported
  available: boolean      // Provides info whether the capability is available
  use: {
    permitted?: boolean   // Provides info whether the capability is permitted
    granted?: boolean     // Provides info whether the capability is granted
  }
  manage: {
    permitted?: boolean   // Provides info whether the capability is permitted
    granted?: boolean     // Provides info whether the capability is granted
  }
  provide: {
    permitted?: boolean   // Provides info whether the capability is permitted
    granted?: boolean     // Provides info whether the capability is granted
  }
  details?: DenyReason[]
}
Examples

Go To Top