@juhuu/sdk-ts 1.2.287 → 1.2.288

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
@@ -6207,15 +6207,20 @@ declare namespace JUHUU {
6207
6207
  }
6208
6208
  namespace Kit {
6209
6209
  type KitType = "controlKitV1" | "tapkeyV1" | "emzV1";
6210
+ type KitStatus = "setupComplete" | "waitingForSetup";
6210
6211
  type BaseKit = {
6211
6212
  id: string;
6212
6213
  readonly object: "kit";
6213
6214
  name: string;
6214
6215
  propertyId: string | null;
6216
+ status: KitStatus;
6215
6217
  };
6216
6218
  type ControlKitV1 = BaseKit & {
6217
6219
  type: "controlKitV1";
6218
6220
  simIdArray: string[];
6221
+ mqttTopicId: string;
6222
+ signalStrengthPercentage: number;
6223
+ teltonikaSerialNumber: string;
6219
6224
  };
6220
6225
  type TapkeyV1 = BaseKit & {
6221
6226
  type: "tapkeyV1";
@@ -6237,23 +6242,31 @@ declare namespace JUHUU {
6237
6242
  type Params = {
6238
6243
  name?: string;
6239
6244
  propertyId: string;
6240
- template: {
6241
- type: "controlKitV1";
6242
- simIdArray: string[];
6243
- } | {
6244
- type: "tapkeyV1";
6245
- physicalLockId: string;
6246
- boundLockId: string;
6247
- ownerAccountId: string;
6248
- ipId: string;
6249
- } | {
6250
- type: "emzV1";
6251
- contractId: string;
6252
- targetHardwareId: string;
6253
- userId: string;
6254
- username: string;
6255
- password: string;
6256
- };
6245
+ type: "controlKitV1";
6246
+ status: KitStatus;
6247
+ simIdArray: string[];
6248
+ mqttTopicId: string;
6249
+ signalStrengthPercentage: number;
6250
+ teltonikaSerialNumber: string;
6251
+ } | {
6252
+ name?: string;
6253
+ propertyId: string;
6254
+ type: "tapkeyV1";
6255
+ status: KitStatus;
6256
+ physicalLockId: string;
6257
+ boundLockId: string;
6258
+ ownerAccountId: string;
6259
+ ipId: string;
6260
+ } | {
6261
+ name?: string;
6262
+ propertyId: string;
6263
+ type: "emzV1";
6264
+ status: KitStatus;
6265
+ contractId: string;
6266
+ targetHardwareId: string;
6267
+ userId: string;
6268
+ username: string;
6269
+ password: string;
6257
6270
  };
6258
6271
  type Options = JUHUU.RequestOptions;
6259
6272
  type Response = {
package/dist/index.d.ts CHANGED
@@ -6207,15 +6207,20 @@ declare namespace JUHUU {
6207
6207
  }
6208
6208
  namespace Kit {
6209
6209
  type KitType = "controlKitV1" | "tapkeyV1" | "emzV1";
6210
+ type KitStatus = "setupComplete" | "waitingForSetup";
6210
6211
  type BaseKit = {
6211
6212
  id: string;
6212
6213
  readonly object: "kit";
6213
6214
  name: string;
6214
6215
  propertyId: string | null;
6216
+ status: KitStatus;
6215
6217
  };
6216
6218
  type ControlKitV1 = BaseKit & {
6217
6219
  type: "controlKitV1";
6218
6220
  simIdArray: string[];
6221
+ mqttTopicId: string;
6222
+ signalStrengthPercentage: number;
6223
+ teltonikaSerialNumber: string;
6219
6224
  };
6220
6225
  type TapkeyV1 = BaseKit & {
6221
6226
  type: "tapkeyV1";
@@ -6237,23 +6242,31 @@ declare namespace JUHUU {
6237
6242
  type Params = {
6238
6243
  name?: string;
6239
6244
  propertyId: string;
6240
- template: {
6241
- type: "controlKitV1";
6242
- simIdArray: string[];
6243
- } | {
6244
- type: "tapkeyV1";
6245
- physicalLockId: string;
6246
- boundLockId: string;
6247
- ownerAccountId: string;
6248
- ipId: string;
6249
- } | {
6250
- type: "emzV1";
6251
- contractId: string;
6252
- targetHardwareId: string;
6253
- userId: string;
6254
- username: string;
6255
- password: string;
6256
- };
6245
+ type: "controlKitV1";
6246
+ status: KitStatus;
6247
+ simIdArray: string[];
6248
+ mqttTopicId: string;
6249
+ signalStrengthPercentage: number;
6250
+ teltonikaSerialNumber: string;
6251
+ } | {
6252
+ name?: string;
6253
+ propertyId: string;
6254
+ type: "tapkeyV1";
6255
+ status: KitStatus;
6256
+ physicalLockId: string;
6257
+ boundLockId: string;
6258
+ ownerAccountId: string;
6259
+ ipId: string;
6260
+ } | {
6261
+ name?: string;
6262
+ propertyId: string;
6263
+ type: "emzV1";
6264
+ status: KitStatus;
6265
+ contractId: string;
6266
+ targetHardwareId: string;
6267
+ userId: string;
6268
+ username: string;
6269
+ password: string;
6257
6270
  };
6258
6271
  type Options = JUHUU.RequestOptions;
6259
6272
  type Response = {
package/dist/index.js CHANGED
@@ -5050,15 +5050,34 @@ var KitsService = class extends Service {
5050
5050
  super(config);
5051
5051
  }
5052
5052
  async create(params, options) {
5053
+ const body = {
5054
+ name: params.name,
5055
+ propertyId: params.propertyId,
5056
+ type: params.type,
5057
+ status: params.status
5058
+ };
5059
+ if (params.type === "controlKitV1") {
5060
+ body.simIdArray = params.simIdArray;
5061
+ body.mqttTopicId = params.mqttTopicId;
5062
+ body.signalStrengthPercentage = params.signalStrengthPercentage;
5063
+ body.teltonikaSerialNumber = params.teltonikaSerialNumber;
5064
+ } else if (params.type === "tapkeyV1") {
5065
+ body.physicalLockId = params.physicalLockId;
5066
+ body.boundLockId = params.boundLockId;
5067
+ body.ownerAccountId = params.ownerAccountId;
5068
+ body.ipId = params.ipId;
5069
+ } else if (params.type === "emzV1") {
5070
+ body.contractId = params.contractId;
5071
+ body.targetHardwareId = params.targetHardwareId;
5072
+ body.userId = params.userId;
5073
+ body.username = params.username;
5074
+ body.password = params.password;
5075
+ }
5053
5076
  return await super.sendRequest(
5054
5077
  {
5055
5078
  method: "POST",
5056
5079
  url: "kits",
5057
- body: {
5058
- name: params.name,
5059
- propertyId: params.propertyId,
5060
- template: params.template
5061
- },
5080
+ body,
5062
5081
  authenticationNotOptional: true
5063
5082
  },
5064
5083
  options
package/dist/index.mjs CHANGED
@@ -5006,15 +5006,34 @@ var KitsService = class extends Service {
5006
5006
  super(config);
5007
5007
  }
5008
5008
  async create(params, options) {
5009
+ const body = {
5010
+ name: params.name,
5011
+ propertyId: params.propertyId,
5012
+ type: params.type,
5013
+ status: params.status
5014
+ };
5015
+ if (params.type === "controlKitV1") {
5016
+ body.simIdArray = params.simIdArray;
5017
+ body.mqttTopicId = params.mqttTopicId;
5018
+ body.signalStrengthPercentage = params.signalStrengthPercentage;
5019
+ body.teltonikaSerialNumber = params.teltonikaSerialNumber;
5020
+ } else if (params.type === "tapkeyV1") {
5021
+ body.physicalLockId = params.physicalLockId;
5022
+ body.boundLockId = params.boundLockId;
5023
+ body.ownerAccountId = params.ownerAccountId;
5024
+ body.ipId = params.ipId;
5025
+ } else if (params.type === "emzV1") {
5026
+ body.contractId = params.contractId;
5027
+ body.targetHardwareId = params.targetHardwareId;
5028
+ body.userId = params.userId;
5029
+ body.username = params.username;
5030
+ body.password = params.password;
5031
+ }
5009
5032
  return await super.sendRequest(
5010
5033
  {
5011
5034
  method: "POST",
5012
5035
  url: "kits",
5013
- body: {
5014
- name: params.name,
5015
- propertyId: params.propertyId,
5016
- template: params.template
5017
- },
5036
+ body,
5018
5037
  authenticationNotOptional: true
5019
5038
  },
5020
5039
  options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.287",
3
+ "version": "1.2.288",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",