@signalk/server-api 2.0.0-beta.2 → 2.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -16,27 +16,26 @@ export interface ResourcesApi {
16
16
  unRegister: (pluginId: string) => void;
17
17
  listResources: (resType: SignalKResourceType, params: {
18
18
  [key: string]: any;
19
- }) => Promise<{
19
+ }, providerId?: string) => Promise<{
20
20
  [id: string]: any;
21
21
  }>;
22
- getResource: (resType: SignalKResourceType, resId: string) => Promise<object>;
22
+ getResource: (resType: SignalKResourceType, resId: string, providerId?: string) => Promise<object>;
23
23
  setResource: (resType: SignalKResourceType, resId: string, data: {
24
24
  [key: string]: any;
25
- }) => Promise<void>;
26
- deleteResource: (resType: SignalKResourceType, resId: string) => Promise<void>;
25
+ }, providerId?: string) => Promise<void>;
26
+ deleteResource: (resType: SignalKResourceType, resId: string, providerId?: string) => Promise<void>;
27
27
  }
28
28
  export interface ResourceProvider {
29
29
  type: ResourceType;
30
30
  methods: ResourceProviderMethods;
31
31
  }
32
32
  export interface ResourceProviderMethods {
33
- pluginId?: string;
34
33
  listResources: (query: {
35
34
  [key: string]: any;
36
35
  }) => Promise<{
37
36
  [id: string]: any;
38
37
  }>;
39
- getResource: (id: string) => Promise<object>;
38
+ getResource: (id: string, property?: string) => Promise<object>;
40
39
  setResource: (id: string, value: {
41
40
  [key: string]: any;
42
41
  }) => Promise<void>;
@@ -81,7 +80,7 @@ export interface PropertyValuesEmitter {
81
80
  *
82
81
  * INCOMPLETE, work in progress.
83
82
  */
84
- export interface PluginServerApp extends PropertyValuesEmitter, ResourceProviderRegistry, AutopilotProviderRegistry {
83
+ export interface PluginServerApp extends PropertyValuesEmitter, ResourceProviderRegistry {
85
84
  }
86
85
  /**
87
86
  * This is the API that a [server plugin](https://github.com/SignalK/signalk-server/blob/master/SERVERPLUGINS.md) must implement.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalk/server-api",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "signalk-server Typescript API for plugins etc with relevant implementation classes",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -522,8 +522,8 @@
522
522
  "affectsGlobalScope": false
523
523
  },
524
524
  "./src/index.ts": {
525
- "version": "51e7a7ea15f5b656af4d5934e1247dd11a40e8eb4cbf46c080a0835158f8ed71",
526
- "signature": "daf30550f6b2fdf181a5a22fd75b33dc42161cf29060f5126662b907508f91c7",
525
+ "version": "d28e589f820dabe7462b236435819390fed1d27be10fbf42177892d8fdb7cdeb",
526
+ "signature": "b7bff5d67d83b2ccd55d324bb487f89c554f8d203159c89ed21cbabe8a0a83bd",
527
527
  "affectsGlobalScope": false
528
528
  },
529
529
  "../../node_modules/@types/chai/index.d.ts": {