TypeScript

Ignite Signals provides first-class developer experience for TypeScript projects utilising tRPC. Our @ignite-signals/api NPM package provides a fully-typed client for your convenience.

The API package exports createClient function for you to use to get yourself started:

import { createClient } from '@ignite-signals/api'

const igniteSignalsClient = createClient('YOUR_API_KEY')

Compatibility

We provide compatibility check services for each supported device group.

Vehicle

This procedure enables service providers to check compatibility with Ignite Signals. The endpoint provides a wide range of eligibility criteria for the Broker to consume and determine eligibility based on their own criteria. Some of the attributes in these datasets will be dependent upon the third-party data vendor.

try {
  const vehicle = igniteSignalsClient.compatibility.checkVehicleCompatibility.query({
    abiCode: '000000',
  })
  if (vehicle.compatible)
    console.log('wahooo 🎉')
}
catch (error) {
  console.log(`error - ${error.code} ${error.message}`)
}

Device Registration

This procedure allows integrating services to register vehicles/devices with Ignite Signals. This procedure should be called to initiate the registration of a device to the Ignite Signals service. You will recieve a workflow_token for use with the VehicleOnboarding component as well as a device_id for the registered device on Ignite Signals, this can be used with a range of other procedures below.

This procedure can be used to re-register an already registered device, resetting any collected auth information and allowing onboarding to be performed again.

try {
  const { device_id, workflow_token } = igniteSignalsClient.device.registerDevice.mutate({
    device_type_id: 'xxxxx',
  })
}
catch (error) {
  console.log(`error - ${error.code} ${error.message}`)
}

Device

This procedure will be used to check the current status of a particular vehicle/device registered on Ignite Signals. Integrating parties will employ this endpoint to check that the requirements of the policy are being fulfilled. If a vehicle/device should become disconnected from the service or telemetry has not been received recently this endpoint will provide this information.

try {
  const device = await trpcClient.device.getDevice.query({
    device_id: 'xxxxx',
  })
  console.log('device', device)
}
catch (error) {
  console.log(`error - ${error.code} ${error.message}`)
}

Devices

This procedure will be used to query the state of multiple devices at once. Using this endpoint integrating parties can determine which devices are requiring attention from the service or the End User without querying each device individually.

This procedure is to be primarily used to determine which Vehicles/Devices are in errored states, tokens revoked and no data received recently.

try {
  const devices = await trpcClient.device.getDevices.query({
    organisation_id: 'xxxxx',
    state: 'REGISTRATION_STARTED',
    limit: 10,
  })
  console.log('devices', devices)
}
catch (error) {
  console.log(`error - ${error.code} ${error.message}`)
}

Device Data

This procedure enables querying of collected data for a particular device. Device data returned with be OEM specific.

try {
  const yesterday = new Date()
  yesterday.setDate(-1)
  const test = await trpcClient.data.getDeviceData.query({
    device_id: 'xxxxx',
    from: yesterday,
    to: new Date(),
    limit: 10,
  })
}
catch (error) {
  console.log(`error - ${error.code} ${error.message}`)
}

Notes

  • All API calls may return errors from them. Please check the code and message properties for more information.