kuzzle-device-manager-types 3.0.0-3-dev.13 → 3.0.0-3-dev.14

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.
@@ -48,6 +48,10 @@ export interface MeasureDefinition {
48
48
  locales?: {
49
49
  [valueName: string]: LocaleDetails;
50
50
  };
51
+ /**
52
+ * Icon representing the measure.
53
+ */
54
+ icon?: string;
51
55
  /**
52
56
  * Mappings for the measurement values in order to index the fields
53
57
  */
@@ -16,12 +16,12 @@ export declare class ModelService extends BaseService {
16
16
  private checkGroupAffinity;
17
17
  writeAsset(engineGroups: string[], model: string, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups, measures: NamedMeasures, tooltipModels: TooltipModels, locales: {
18
18
  [valueName: string]: LocaleDetails;
19
- }, engineIds?: string[]): Promise<KDocument<AssetModelContent>>;
20
- writeDevice(model: string, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups, measures: NamedMeasures): Promise<KDocument<DeviceModelContent>>;
21
- writeGroup(engineGroups: string[], model: string, affinity: JSONObject, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups): Promise<KDocument<GroupModelContent>>;
19
+ }, engineIds?: string[], icon?: string): Promise<KDocument<AssetModelContent>>;
20
+ writeDevice(model: string, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups, measures: NamedMeasures, icon?: string): Promise<KDocument<DeviceModelContent>>;
21
+ writeGroup(engineGroups: string[], model: string, affinity: JSONObject, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups, icon?: string): Promise<KDocument<GroupModelContent>>;
22
22
  writeMeasure(type: string, valuesMappings: JSONObject, validationSchema?: SchemaObject, valuesDetails?: MeasureValuesDetails, locales?: {
23
23
  [valueName: string]: LocaleDetails;
24
- }, engineIds?: string[]): Promise<KDocument<MeasureModelContent>>;
24
+ }, engineIds?: string[], icon?: string): Promise<KDocument<MeasureModelContent>>;
25
25
  deleteAsset(_id: string): Promise<void>;
26
26
  deleteDevice(_id: string): Promise<void>;
27
27
  deleteGroup(_id: string): Promise<void>;
@@ -67,5 +67,5 @@ export declare class ModelService extends BaseService {
67
67
  */
68
68
  updateAsset(engineGroups: string[], engineId: string | undefined, model: string, metadataMappings: MetadataMappings, defaultMetadata: JSONObject, metadataDetails: MetadataDetails, metadataGroups: MetadataGroups, measures: AssetModelContent["asset"]["measures"], tooltipModels: TooltipModels, locales: {
69
69
  [valueName: string]: LocaleDetails;
70
- }, request: KuzzleRequest): Promise<KDocument<AssetModelContent>>;
70
+ }, icon: string | undefined, request: KuzzleRequest): Promise<KDocument<AssetModelContent>>;
71
71
  }
@@ -25,11 +25,12 @@ export declare class ModelsRegister {
25
25
  * @param metadataDetails - Optional detailed metadata descriptions, localizations and definition.
26
26
  * @param metadataGroups - Optional groups for organizing metadata, with localizations.
27
27
  * @param tooltipModels - Optional model list for tooltip, containing labels and tooltip content.
28
+ * @param icon - Optional icon representing the model.
28
29
  * @throws PluginImplementationError if the model name is not in PascalCase.
29
30
  */
30
31
  registerAsset(engineGroups: string[], model: string, measures: NamedMeasures, metadataMappings?: MetadataMappings, defaultMetadata?: JSONObject, metadataDetails?: MetadataDetails, metadataGroups?: MetadataGroups, tooltipModels?: TooltipModels, locales?: {
31
32
  [valueName: string]: LocaleDetails;
32
- }): void;
33
+ }, icon?: string): void;
33
34
  /**
34
35
  * Registers a device model.
35
36
  *
@@ -39,9 +40,10 @@ export declare class ModelsRegister {
39
40
  * @param defaultMetadata - The default metadata values for the model, defaults to an empty object.
40
41
  * @param metadataDetails - Optional detailed metadata descriptions, localizations and definition.
41
42
  * @param metadataGroups - Optional groups for organizing metadata, with localizations.
43
+ * @param icon - Optional icon representing the model.
42
44
  * @throws PluginImplementationError if the model name is not in PascalCase.
43
45
  */
44
- registerDevice(model: string, measures: NamedMeasures, metadataMappings?: MetadataMappings, defaultMetadata?: JSONObject, metadataDetails?: MetadataDetails, metadataGroups?: MetadataGroups): void;
46
+ registerDevice(model: string, measures: NamedMeasures, metadataMappings?: MetadataMappings, defaultMetadata?: JSONObject, metadataDetails?: MetadataDetails, metadataGroups?: MetadataGroups, icon?: string): void;
45
47
  /**
46
48
  * Registers a group model.
47
49
  *
@@ -53,9 +55,10 @@ export declare class ModelsRegister {
53
55
  * @param defaultMetadata - The default metadata values for the model, defaults to an empty object.
54
56
  * @param metadataDetails - Optional detailed metadata descriptions, localizations and definition.
55
57
  * @param metadataGroups - Optional groups for organizing metadata, with localizations.
58
+ * @param icon - Optional icon representing the model.
56
59
  * @throws PluginImplementationError if the model name is not in PascalCase.
57
60
  */
58
- registerGroup(engineGroups: string[], model: string, affinity: GroupAffinity, metadataMappings?: MetadataMappings, defaultMetadata?: JSONObject, metadataDetails?: MetadataDetails, metadataGroups?: MetadataGroups): void;
61
+ registerGroup(engineGroups: string[], model: string, affinity: GroupAffinity, metadataMappings?: MetadataMappings, defaultMetadata?: JSONObject, metadataDetails?: MetadataDetails, metadataGroups?: MetadataGroups, icon?: string): void;
59
62
  registerMeasure(type: string, measureDefinition: MeasureDefinition): void;
60
63
  private load;
61
64
  }
@@ -33,6 +33,7 @@ export interface ApiModelWriteAssetRequest extends ModelsControllerRequest {
33
33
  engineGroups: string[];
34
34
  engineIds?: string[];
35
35
  model: string;
36
+ icon?: string;
36
37
  metadataDetails?: MetadataDetails;
37
38
  metadataGroups?: MetadataGroups;
38
39
  metadataMappings?: MetadataMappings;
@@ -49,6 +50,7 @@ export interface ApiModelWriteDeviceRequest extends ModelsControllerRequest {
49
50
  action: "writeDevice";
50
51
  body: {
51
52
  model: string;
53
+ icon?: string;
52
54
  metadataDetails?: MetadataDetails;
53
55
  metadataGroups?: MetadataGroups;
54
56
  metadataMappings?: MetadataMappings;
@@ -63,6 +65,7 @@ export interface ApiModelWriteGroupRequest extends ModelsControllerRequest {
63
65
  affinity: GroupAffinity;
64
66
  engineGroups: string[];
65
67
  model: string;
68
+ icon?: string;
66
69
  metadataDetails?: MetadataDetails;
67
70
  metadataGroups?: MetadataGroups;
68
71
  metadataMappings?: MetadataMappings;
@@ -75,6 +78,7 @@ export interface ApiModelWriteMeasureRequest extends ModelsControllerRequest {
75
78
  body: {
76
79
  type: string;
77
80
  engineIds?: string[];
81
+ icon?: string;
78
82
  locales?: {
79
83
  [valueName: string]: LocaleDetails;
80
84
  };
@@ -89,6 +93,7 @@ export interface ApiModelUpdateAssetRequest extends ModelsControllerRequest {
89
93
  engineGroups: string[];
90
94
  model: string;
91
95
  body: {
96
+ icon?: string;
92
97
  metadataDetails?: MetadataDetails;
93
98
  metadataGroups?: MetadataGroups;
94
99
  metadataMappings?: MetadataMappings;
@@ -167,6 +167,10 @@ export interface AssetModelContent extends KDocumentContent {
167
167
  * Name of the model
168
168
  */
169
169
  model: string;
170
+ /**
171
+ * Icon representing the asset model.
172
+ */
173
+ icon?: string;
170
174
  /**
171
175
  * Metadata mappings.
172
176
  *
@@ -308,6 +312,10 @@ export interface DeviceModelContent extends KDocumentContent {
308
312
  * Name of the model
309
313
  */
310
314
  model: string;
315
+ /**
316
+ * Icon representing the device model.
317
+ */
318
+ icon?: string;
311
319
  /**
312
320
  * Metadata mappings.
313
321
  *
@@ -398,6 +406,10 @@ export interface GroupModelContent extends KDocumentContent {
398
406
  * Name of the model
399
407
  */
400
408
  model: string;
409
+ /**
410
+ * Icon representing the group model.
411
+ */
412
+ icon?: string;
401
413
  /**
402
414
  * Group types and model affinities
403
415
  */
@@ -113,6 +113,10 @@ export type AssetModelDefinition = {
113
113
  * Array describing measures names and types
114
114
  */
115
115
  measures: NamedMeasures;
116
+ /**
117
+ * Icon representing the asset model.
118
+ */
119
+ icon?: string;
116
120
  /**
117
121
  * Metadata mappings definition
118
122
  */
@@ -192,6 +196,10 @@ export type DeviceModelDefinition = {
192
196
  * Decoder used to decode payloads
193
197
  */
194
198
  decoder: Decoder;
199
+ /**
200
+ * Icon representing the device model.
201
+ */
202
+ icon?: string;
195
203
  /**
196
204
  * Metadata mappings definition
197
205
  */
@@ -283,6 +291,10 @@ export type GroupModelDefinition = {
283
291
  * Metadata mappings definition
284
292
  */
285
293
  affinity: GroupAffinity;
294
+ /**
295
+ * Icon representing the group model.
296
+ */
297
+ icon?: string;
286
298
  /**
287
299
  * Metadata mappings definition
288
300
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kuzzle-device-manager-types",
3
- "version": "3.0.0-3-dev.13",
3
+ "version": "3.0.0-3-dev.14",
4
4
  "description": "Shared types for Kuzzle Device Manager",
5
5
  "author": "The Kuzzle Team (support@kuzzle.io)",
6
6
  "main": "index.js",