npm install @oneblink/sdk --save
This SDK is the entry point for all OneBlink Productivity instances. The default instance is the OneBlink Console. To use a different tenant to the default, change the require path to include the desired tenant. The available tenants are:
const OneBlink = require('@oneblink/sdk')
// or
const OneBlink = require('@oneblink/sdk/tenants/oneblink')
const CivicPlus = require('@oneblink/sdk/tenants/civicplus')
Once the SDK has been required
, all class documentation below applies to all tenants. However, all of the examples use the default tenant. If you copy and paste from the examples, please don't forget to change (replacing my-tenant
with a valid tenant path):
const OneBlink = require('@oneblink/sdk')
// to
const MyTenant = require('@oneblink/sdk/tenants/my-tenant')
This SDK also supports Typescript Modules:
import * as OneBlink from '@oneblink/sdk'
Various Types used in this package can also be imported:
import * as Types from '@oneblink/sdk/types'
The majority of actions in this SDK require that your developer key has particular permissions. These permissions can be set in your tenant's console. If you do not have access to your tenant's console, you will need to work with your Administrator to associate the permissions that you require with your key. The associated permissions for each function are detailed on the function definitions.
Actions that allow a developer key with a minimum role permission will have the following in the function definition:
Minimum Role Permission
The developer key used must be assigned a role with at least the permission documented for each action. E.g. If the action's minimum role permission is Forms: Read Only, the role assigned to the developer key could have Forms: Read Only or Forms: Manager.
Actions that require a developer key to be assigned to an app will have the following in the function definition:
App Association Required
In the case of any actions relating to forms, the assigned app must be associated with the form that is being actioned. A form can be associated with an app in the following ways:
Submission Data Key Supported
In the case of any actions relating to retrieving form submission data, a Submission Data developer key can be used so long as the developer key has been assigned to the form that is being actioned.