@juhuu/sdk-ts 1.2.221 → 1.2.223

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.mts CHANGED
@@ -1055,6 +1055,7 @@ declare class ParameterAnomalyGroupTrackersService extends Service {
1055
1055
  declare class EmzService extends Service {
1056
1056
  constructor(config: JUHUU.SetupConfig);
1057
1057
  credentials(EmzCredentialsParams: JUHUU.Emz.Credentials.Params, EmzCredentialsOptions?: JUHUU.Emz.Credentials.Options): Promise<JUHUU.HttpResponse<JUHUU.Emz.Credentials.Response>>;
1058
+ logs(EmzLogsParams: JUHUU.Emz.Logs.Params, EmzLogsOptions?: JUHUU.Emz.Logs.Options): Promise<JUHUU.HttpResponse<JUHUU.Emz.Logs.Response>>;
1058
1059
  }
1059
1060
 
1060
1061
  declare class FlowsService extends Service {
@@ -1579,6 +1580,14 @@ declare namespace JUHUU {
1579
1580
  export { };
1580
1581
  }
1581
1582
  namespace Emz {
1583
+ namespace Log {
1584
+ type Object = {
1585
+ id: string;
1586
+ userId: string;
1587
+ logArray: string[];
1588
+ createdAt: Date;
1589
+ };
1590
+ }
1582
1591
  namespace Credentials {
1583
1592
  type Params = {
1584
1593
  deviceId: string;
@@ -1591,6 +1600,16 @@ declare namespace JUHUU {
1591
1600
  emzToken: string;
1592
1601
  };
1593
1602
  }
1603
+ namespace Logs {
1604
+ type Params = {
1605
+ userId: string;
1606
+ logArray: string[];
1607
+ };
1608
+ type Options = JUHUU.RequestOptions;
1609
+ type Response = {
1610
+ emzLog: JUHUU.Emz.Log.Object;
1611
+ };
1612
+ }
1594
1613
  }
1595
1614
  namespace Tapkey {
1596
1615
  namespace Credentials {
@@ -3539,6 +3558,9 @@ declare namespace JUHUU {
3539
3558
  deviceId?: string;
3540
3559
  name?: string;
3541
3560
  currentValue?: string | boolean | number;
3561
+ description?: string | null;
3562
+ enumArray?: string[];
3563
+ reference?: string | null;
3542
3564
  };
3543
3565
  type Options = JUHUU.RequestOptions;
3544
3566
  type Response = {
package/dist/index.d.ts CHANGED
@@ -1055,6 +1055,7 @@ declare class ParameterAnomalyGroupTrackersService extends Service {
1055
1055
  declare class EmzService extends Service {
1056
1056
  constructor(config: JUHUU.SetupConfig);
1057
1057
  credentials(EmzCredentialsParams: JUHUU.Emz.Credentials.Params, EmzCredentialsOptions?: JUHUU.Emz.Credentials.Options): Promise<JUHUU.HttpResponse<JUHUU.Emz.Credentials.Response>>;
1058
+ logs(EmzLogsParams: JUHUU.Emz.Logs.Params, EmzLogsOptions?: JUHUU.Emz.Logs.Options): Promise<JUHUU.HttpResponse<JUHUU.Emz.Logs.Response>>;
1058
1059
  }
1059
1060
 
1060
1061
  declare class FlowsService extends Service {
@@ -1579,6 +1580,14 @@ declare namespace JUHUU {
1579
1580
  export { };
1580
1581
  }
1581
1582
  namespace Emz {
1583
+ namespace Log {
1584
+ type Object = {
1585
+ id: string;
1586
+ userId: string;
1587
+ logArray: string[];
1588
+ createdAt: Date;
1589
+ };
1590
+ }
1582
1591
  namespace Credentials {
1583
1592
  type Params = {
1584
1593
  deviceId: string;
@@ -1591,6 +1600,16 @@ declare namespace JUHUU {
1591
1600
  emzToken: string;
1592
1601
  };
1593
1602
  }
1603
+ namespace Logs {
1604
+ type Params = {
1605
+ userId: string;
1606
+ logArray: string[];
1607
+ };
1608
+ type Options = JUHUU.RequestOptions;
1609
+ type Response = {
1610
+ emzLog: JUHUU.Emz.Log.Object;
1611
+ };
1612
+ }
1594
1613
  }
1595
1614
  namespace Tapkey {
1596
1615
  namespace Credentials {
@@ -3539,6 +3558,9 @@ declare namespace JUHUU {
3539
3558
  deviceId?: string;
3540
3559
  name?: string;
3541
3560
  currentValue?: string | boolean | number;
3561
+ description?: string | null;
3562
+ enumArray?: string[];
3563
+ reference?: string | null;
3542
3564
  };
3543
3565
  type Options = JUHUU.RequestOptions;
3544
3566
  type Response = {
package/dist/index.js CHANGED
@@ -1677,20 +1677,21 @@ var TariffsService = class extends Service {
1677
1677
  if (this.isFree(tariff) === true) {
1678
1678
  return 0;
1679
1679
  }
1680
- if (tariff.interval === 0) {
1681
- return tariff.amount[0];
1682
- }
1683
1680
  if (rentTimeSeconds > tariff.duration) {
1684
1681
  console.warn("rentTimeS is greater than duration");
1685
1682
  rentTimeSeconds = tariff.duration;
1686
1683
  }
1687
1684
  let sum = 0;
1688
- const startedIntervals = Math.ceil(rentTimeSeconds / tariff.interval);
1689
- for (let i = 0; i < startedIntervals; i += 1) {
1690
- if (i < tariff.amount.length) {
1691
- sum += tariff.amount[i];
1692
- } else {
1693
- sum += tariff.continue;
1685
+ if (tariff.interval === 0) {
1686
+ sum = tariff.amount[0];
1687
+ } else {
1688
+ const startedIntervals = Math.ceil(rentTimeSeconds / tariff.interval);
1689
+ for (let i = 0; i < startedIntervals; i += 1) {
1690
+ if (i < tariff.amount.length) {
1691
+ sum += tariff.amount[i];
1692
+ } else {
1693
+ sum += tariff.continue;
1694
+ }
1694
1695
  }
1695
1696
  }
1696
1697
  let serviceFee = Math.round(sum * tariff.serviceFeePercentage / 100);
@@ -2958,6 +2959,7 @@ var ParametersService = class extends Service {
2958
2959
  body: {
2959
2960
  name: ParameterUpdateParams.name,
2960
2961
  currentValue: ParameterUpdateParams.currentValue,
2962
+ enumArray: ParameterUpdateParams.enumArray,
2961
2963
  deviceId: ParameterUpdateParams.deviceId
2962
2964
  },
2963
2965
  authenticationNotOptional: true
@@ -3366,6 +3368,21 @@ var EmzService = class extends Service {
3366
3368
  EmzCredentialsOptions
3367
3369
  );
3368
3370
  }
3371
+ async logs(EmzLogsParams, EmzLogsOptions) {
3372
+ const queryArray = [];
3373
+ return await super.sendRequest(
3374
+ {
3375
+ method: "POST",
3376
+ url: "emz/logs",
3377
+ body: {
3378
+ userId: EmzLogsParams.userId,
3379
+ logArray: EmzLogsParams.logArray
3380
+ },
3381
+ authenticationNotOptional: true
3382
+ },
3383
+ EmzLogsOptions
3384
+ );
3385
+ }
3369
3386
  };
3370
3387
 
3371
3388
  // src/flows/flows.service.ts
package/dist/index.mjs CHANGED
@@ -1633,20 +1633,21 @@ var TariffsService = class extends Service {
1633
1633
  if (this.isFree(tariff) === true) {
1634
1634
  return 0;
1635
1635
  }
1636
- if (tariff.interval === 0) {
1637
- return tariff.amount[0];
1638
- }
1639
1636
  if (rentTimeSeconds > tariff.duration) {
1640
1637
  console.warn("rentTimeS is greater than duration");
1641
1638
  rentTimeSeconds = tariff.duration;
1642
1639
  }
1643
1640
  let sum = 0;
1644
- const startedIntervals = Math.ceil(rentTimeSeconds / tariff.interval);
1645
- for (let i = 0; i < startedIntervals; i += 1) {
1646
- if (i < tariff.amount.length) {
1647
- sum += tariff.amount[i];
1648
- } else {
1649
- sum += tariff.continue;
1641
+ if (tariff.interval === 0) {
1642
+ sum = tariff.amount[0];
1643
+ } else {
1644
+ const startedIntervals = Math.ceil(rentTimeSeconds / tariff.interval);
1645
+ for (let i = 0; i < startedIntervals; i += 1) {
1646
+ if (i < tariff.amount.length) {
1647
+ sum += tariff.amount[i];
1648
+ } else {
1649
+ sum += tariff.continue;
1650
+ }
1650
1651
  }
1651
1652
  }
1652
1653
  let serviceFee = Math.round(sum * tariff.serviceFeePercentage / 100);
@@ -2914,6 +2915,7 @@ var ParametersService = class extends Service {
2914
2915
  body: {
2915
2916
  name: ParameterUpdateParams.name,
2916
2917
  currentValue: ParameterUpdateParams.currentValue,
2918
+ enumArray: ParameterUpdateParams.enumArray,
2917
2919
  deviceId: ParameterUpdateParams.deviceId
2918
2920
  },
2919
2921
  authenticationNotOptional: true
@@ -3322,6 +3324,21 @@ var EmzService = class extends Service {
3322
3324
  EmzCredentialsOptions
3323
3325
  );
3324
3326
  }
3327
+ async logs(EmzLogsParams, EmzLogsOptions) {
3328
+ const queryArray = [];
3329
+ return await super.sendRequest(
3330
+ {
3331
+ method: "POST",
3332
+ url: "emz/logs",
3333
+ body: {
3334
+ userId: EmzLogsParams.userId,
3335
+ logArray: EmzLogsParams.logArray
3336
+ },
3337
+ authenticationNotOptional: true
3338
+ },
3339
+ EmzLogsOptions
3340
+ );
3341
+ }
3325
3342
  };
3326
3343
 
3327
3344
  // src/flows/flows.service.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.221",
3
+ "version": "1.2.223",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",