@panaaj/sk-types
Advanced tools
Comparing version 1.0.0 to 1.1.0
# CHANGELOG: @panaaj/sk-types | ||
### v1.1.0 | ||
Add Request / Response types. | ||
Add Reources types | ||
Update `server/api` interface to include `setPluginStatus` and `setPluginError` which replace deprecated `setProviderStatus` and `setProviderError` | ||
### v1.0.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@panaaj/sk-types", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Signal K plugin types.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -0,2 +1,10 @@ | ||
import { DeltaUpdate, DeltaNotification } from './delta'; | ||
export enum ServerRoles { | ||
master= "master", | ||
main= "main", | ||
aux= "aux", | ||
slave= "slave" | ||
} | ||
@@ -19,3 +27,6 @@ export interface ServerAPI extends | ||
debug: (msg: string) => void | ||
handleMessage: (id: string | null, msg: any) => void | ||
handleMessage: ( | ||
id: string | null, | ||
msg: DeltaUpdate | DeltaNotification | ||
) => void | ||
savePluginOptions: ( | ||
@@ -65,2 +76,4 @@ configuration: object, | ||
interface ProviderStatusLogger { | ||
setPluginStatus: (pluginId: string, status?: string) => void | ||
setPluginError: (pluginId: string, status?: string) => void | ||
setProviderStatus: (providerId: string, status?: string) => void | ||
@@ -67,0 +80,0 @@ setProviderError: (providerId: string, status?: string) => void |
@@ -1,3 +0,17 @@ | ||
import { ALARM_STATE, ALARM_METHOD } from './notification'; | ||
// ** Notifications ** | ||
export enum ALARM_STATE { | ||
nominal = 'nominal', | ||
normal = 'normal', | ||
alert = 'alert', | ||
warn = 'warn', | ||
alarm = 'alarm', | ||
emergency = 'emergency' | ||
} | ||
export enum ALARM_METHOD { | ||
visual = 'visual', | ||
sound = 'sound' | ||
} | ||
// ** Server Messages ** | ||
export interface DeltaMessage { | ||
@@ -15,3 +29,2 @@ path: string; | ||
export interface DeltaNotification extends DeltaMessage { | ||
path: string, | ||
value: { | ||
@@ -18,0 +31,0 @@ state: ALARM_STATE, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10030
13
352
1