myio-js-library 0.1.367 → 0.1.368

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.cjs CHANGED
@@ -1062,7 +1062,7 @@ module.exports = __toCommonJS(index_exports);
1062
1062
  // package.json
1063
1063
  var package_default = {
1064
1064
  name: "myio-js-library",
1065
- version: "0.1.367",
1065
+ version: "0.1.368",
1066
1066
  description: "A clean, standalone JS SDK for MYIO projects",
1067
1067
  license: "MIT",
1068
1068
  repository: "github:gh-myio/myio-js-library",
@@ -2595,6 +2595,10 @@ var ContextType = {
2595
2595
  EQUIPMENTS: "equipments",
2596
2596
  STORES: "stores",
2597
2597
  ENTRADA: "entrada",
2598
+ BOMBA: "bomba",
2599
+ // Pumps (BAS)
2600
+ MOTOR: "motor",
2601
+ // Motors (BAS)
2598
2602
  // Water contexts
2599
2603
  HIDROMETRO: "hidrometro",
2600
2604
  // Lojas (stores)
@@ -2604,6 +2608,10 @@ var ContextType = {
2604
2608
  // Banheiros (identifier = 'BANHEIROS')
2605
2609
  HIDROMETRO_ENTRADA: "hidrometro_entrada",
2606
2610
  // Entrada do shopping
2611
+ CAIXA_DAGUA: "caixadagua",
2612
+ // Water tank (BAS)
2613
+ SOLENOIDE: "solenoide",
2614
+ // Solenoid valve (BAS)
2607
2615
  // Temperature contexts
2608
2616
  TERMOSTATO: "termostato",
2609
2617
  TERMOSTATO_EXTERNAL: "termostato_external"
@@ -2615,6 +2623,12 @@ function detectContext(device, domain) {
2615
2623
  const entradaTypes = ["ENTRADA", "RELOGIO", "TRAFO", "SUBESTACAO"];
2616
2624
  const isEntrada = entradaTypes.some((t) => deviceType.includes(t) || deviceProfile.includes(t));
2617
2625
  if (domain === DomainType2.WATER) {
2626
+ if (deviceType.includes("CAIXA_DAGUA") || deviceProfile.includes("CAIXA_DAGUA")) {
2627
+ return ContextType.CAIXA_DAGUA;
2628
+ }
2629
+ if (deviceType.includes("SOLENOIDE") || deviceProfile.includes("SOLENOIDE")) {
2630
+ return ContextType.SOLENOIDE;
2631
+ }
2618
2632
  if (deviceType.includes("HIDROMETRO_SHOPPING") || deviceProfile.includes("HIDROMETRO_SHOPPING")) {
2619
2633
  return ContextType.HIDROMETRO_ENTRADA;
2620
2634
  }
@@ -2636,6 +2650,12 @@ function detectContext(device, domain) {
2636
2650
  if (isEntrada) {
2637
2651
  return ContextType.ENTRADA;
2638
2652
  }
2653
+ if (deviceType.includes("BOMBA") || deviceProfile.includes("BOMBA")) {
2654
+ return ContextType.BOMBA;
2655
+ }
2656
+ if (deviceType.includes("MOTOR") || deviceProfile.includes("MOTOR")) {
2657
+ return ContextType.MOTOR;
2658
+ }
2639
2659
  if (deviceType === "3F_MEDIDOR" && deviceProfile === "3F_MEDIDOR") {
2640
2660
  return ContextType.STORES;
2641
2661
  }
package/dist/index.d.cts CHANGED
@@ -1393,10 +1393,14 @@ declare namespace ContextType {
1393
1393
  let EQUIPMENTS: string;
1394
1394
  let STORES: string;
1395
1395
  let ENTRADA: string;
1396
+ let BOMBA: string;
1397
+ let MOTOR: string;
1396
1398
  let HIDROMETRO: string;
1397
1399
  let HIDROMETRO_AREA_COMUM: string;
1398
1400
  let BANHEIROS: string;
1399
1401
  let HIDROMETRO_ENTRADA: string;
1402
+ let CAIXA_DAGUA: string;
1403
+ let SOLENOIDE: string;
1400
1404
  let TERMOSTATO: string;
1401
1405
  let TERMOSTATO_EXTERNAL: string;
1402
1406
  }
package/dist/index.js CHANGED
@@ -546,7 +546,7 @@ var init_template_card = __esm({
546
546
  // package.json
547
547
  var package_default = {
548
548
  name: "myio-js-library",
549
- version: "0.1.367",
549
+ version: "0.1.368",
550
550
  description: "A clean, standalone JS SDK for MYIO projects",
551
551
  license: "MIT",
552
552
  repository: "github:gh-myio/myio-js-library",
@@ -2079,6 +2079,10 @@ var ContextType = {
2079
2079
  EQUIPMENTS: "equipments",
2080
2080
  STORES: "stores",
2081
2081
  ENTRADA: "entrada",
2082
+ BOMBA: "bomba",
2083
+ // Pumps (BAS)
2084
+ MOTOR: "motor",
2085
+ // Motors (BAS)
2082
2086
  // Water contexts
2083
2087
  HIDROMETRO: "hidrometro",
2084
2088
  // Lojas (stores)
@@ -2088,6 +2092,10 @@ var ContextType = {
2088
2092
  // Banheiros (identifier = 'BANHEIROS')
2089
2093
  HIDROMETRO_ENTRADA: "hidrometro_entrada",
2090
2094
  // Entrada do shopping
2095
+ CAIXA_DAGUA: "caixadagua",
2096
+ // Water tank (BAS)
2097
+ SOLENOIDE: "solenoide",
2098
+ // Solenoid valve (BAS)
2091
2099
  // Temperature contexts
2092
2100
  TERMOSTATO: "termostato",
2093
2101
  TERMOSTATO_EXTERNAL: "termostato_external"
@@ -2099,6 +2107,12 @@ function detectContext(device, domain) {
2099
2107
  const entradaTypes = ["ENTRADA", "RELOGIO", "TRAFO", "SUBESTACAO"];
2100
2108
  const isEntrada = entradaTypes.some((t) => deviceType.includes(t) || deviceProfile.includes(t));
2101
2109
  if (domain === DomainType2.WATER) {
2110
+ if (deviceType.includes("CAIXA_DAGUA") || deviceProfile.includes("CAIXA_DAGUA")) {
2111
+ return ContextType.CAIXA_DAGUA;
2112
+ }
2113
+ if (deviceType.includes("SOLENOIDE") || deviceProfile.includes("SOLENOIDE")) {
2114
+ return ContextType.SOLENOIDE;
2115
+ }
2102
2116
  if (deviceType.includes("HIDROMETRO_SHOPPING") || deviceProfile.includes("HIDROMETRO_SHOPPING")) {
2103
2117
  return ContextType.HIDROMETRO_ENTRADA;
2104
2118
  }
@@ -2120,6 +2134,12 @@ function detectContext(device, domain) {
2120
2134
  if (isEntrada) {
2121
2135
  return ContextType.ENTRADA;
2122
2136
  }
2137
+ if (deviceType.includes("BOMBA") || deviceProfile.includes("BOMBA")) {
2138
+ return ContextType.BOMBA;
2139
+ }
2140
+ if (deviceType.includes("MOTOR") || deviceProfile.includes("MOTOR")) {
2141
+ return ContextType.MOTOR;
2142
+ }
2123
2143
  if (deviceType === "3F_MEDIDOR" && deviceProfile === "3F_MEDIDOR") {
2124
2144
  return ContextType.STORES;
2125
2145
  }
@@ -551,7 +551,7 @@
551
551
 
552
552
  // package.json
553
553
  var package_default = {
554
- version: "0.1.367"};
554
+ version: "0.1.368"};
555
555
 
556
556
  // src/format/energy.ts
557
557
  function formatEnergy(value, unit, decimals = 3) {
@@ -2026,6 +2026,10 @@
2026
2026
  EQUIPMENTS: "equipments",
2027
2027
  STORES: "stores",
2028
2028
  ENTRADA: "entrada",
2029
+ BOMBA: "bomba",
2030
+ // Pumps (BAS)
2031
+ MOTOR: "motor",
2032
+ // Motors (BAS)
2029
2033
  // Water contexts
2030
2034
  HIDROMETRO: "hidrometro",
2031
2035
  // Lojas (stores)
@@ -2035,6 +2039,10 @@
2035
2039
  // Banheiros (identifier = 'BANHEIROS')
2036
2040
  HIDROMETRO_ENTRADA: "hidrometro_entrada",
2037
2041
  // Entrada do shopping
2042
+ CAIXA_DAGUA: "caixadagua",
2043
+ // Water tank (BAS)
2044
+ SOLENOIDE: "solenoide",
2045
+ // Solenoid valve (BAS)
2038
2046
  // Temperature contexts
2039
2047
  TERMOSTATO: "termostato",
2040
2048
  TERMOSTATO_EXTERNAL: "termostato_external"
@@ -2046,6 +2054,12 @@
2046
2054
  const entradaTypes = ["ENTRADA", "RELOGIO", "TRAFO", "SUBESTACAO"];
2047
2055
  const isEntrada = entradaTypes.some((t) => deviceType.includes(t) || deviceProfile.includes(t));
2048
2056
  if (domain === DomainType2.WATER) {
2057
+ if (deviceType.includes("CAIXA_DAGUA") || deviceProfile.includes("CAIXA_DAGUA")) {
2058
+ return ContextType.CAIXA_DAGUA;
2059
+ }
2060
+ if (deviceType.includes("SOLENOIDE") || deviceProfile.includes("SOLENOIDE")) {
2061
+ return ContextType.SOLENOIDE;
2062
+ }
2049
2063
  if (deviceType.includes("HIDROMETRO_SHOPPING") || deviceProfile.includes("HIDROMETRO_SHOPPING")) {
2050
2064
  return ContextType.HIDROMETRO_ENTRADA;
2051
2065
  }
@@ -2067,6 +2081,12 @@
2067
2081
  if (isEntrada) {
2068
2082
  return ContextType.ENTRADA;
2069
2083
  }
2084
+ if (deviceType.includes("BOMBA") || deviceProfile.includes("BOMBA")) {
2085
+ return ContextType.BOMBA;
2086
+ }
2087
+ if (deviceType.includes("MOTOR") || deviceProfile.includes("MOTOR")) {
2088
+ return ContextType.MOTOR;
2089
+ }
2070
2090
  if (deviceType === "3F_MEDIDOR" && deviceProfile === "3F_MEDIDOR") {
2071
2091
  return ContextType.STORES;
2072
2092
  }