@openxiot/xiot-core-spec-ts 0.0.13 → 0.0.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.
@@ -14,17 +14,20 @@ class NamespaceDefinitionCodec {
14
14
  return array;
15
15
  }
16
16
  static decode(o) {
17
+ const organization = o.organization || '';
17
18
  const visibility = o[Spec_1.Spec.VISIBILITY] || '';
18
19
  const namespace = o[Spec_1.Spec.NAMESPACE];
19
20
  const description = DescriptionCodec_1.DescriptionCodec.decode(o[Spec_1.Spec.DESCRIPTION]);
20
21
  const def = new NamespaceDefinition_1.NamespaceDefinition(namespace, description);
21
22
  def.visibility = (0, Visibility_1.VisibilityFromString)(visibility);
23
+ def.organization = organization;
22
24
  return def;
23
25
  }
24
26
  static encode(def) {
25
27
  let o = {
26
28
  namespace: def.namespace,
27
- description: DescriptionCodec_1.DescriptionCodec.encode(def.description)
29
+ description: DescriptionCodec_1.DescriptionCodec.encode(def.description),
30
+ organization: def.organization
28
31
  };
29
32
  if (def.visibility === Visibility_1.Visibility.UNDEFINED) {
30
33
  o[Spec_1.Spec.VISIBILITY] = def.visibility;
@@ -3,5 +3,6 @@ export declare class NamespaceDefinition {
3
3
  namespace: string;
4
4
  description: Map<string, string>;
5
5
  visibility: Visibility;
6
+ organization: string;
6
7
  constructor(namespace: string, description: Map<string, string>);
7
8
  }
@@ -7,6 +7,7 @@ class NamespaceDefinition {
7
7
  this.namespace = '';
8
8
  this.description = new Map();
9
9
  this.visibility = Visibility_1.Visibility.UNDEFINED;
10
+ this.organization = '';
10
11
  this.namespace = namespace;
11
12
  this.description = description;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openxiot/xiot-core-spec-ts",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "XIOT Specification Codec",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",