@juhuu/sdk-ts 1.2.146 → 1.2.148
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 +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +22 -1
- package/dist/index.mjs +22 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -661,6 +661,7 @@ declare class DevicesService extends Service {
|
|
661
661
|
message(DeviceMessageParams: JUHUU.Device.Message.Params, DeviceMessageOptions?: JUHUU.Device.Message.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Message.Response>>;
|
662
662
|
parameterUpdate(DeviceParameterParams: JUHUU.Device.ParameterUpdate.Params, DeviceParameterOptions?: JUHUU.Device.ParameterUpdate.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.ParameterUpdate.Response>>;
|
663
663
|
commandExecute(DeviceCommandExecuteParams: JUHUU.Device.CommandExecute.Params, DeviceCommandExecuteOptions?: JUHUU.Device.CommandExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.CommandExecute.Response>>;
|
664
|
+
nodeExecute(DeviceNodeExecuteParams: JUHUU.Device.NodeExecute.Params, DeviceNodeExecuteOptions?: JUHUU.Device.NodeExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.NodeExecute.Response>>;
|
664
665
|
delete(DeviceDeleteParams: JUHUU.Device.Delete.Params, DeviceDeleteOptions?: JUHUU.Device.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Delete.Response>>;
|
665
666
|
}
|
666
667
|
|
@@ -2943,6 +2944,16 @@ declare namespace JUHUU {
|
|
2943
2944
|
device: JUHUU.Device.Object;
|
2944
2945
|
};
|
2945
2946
|
}
|
2947
|
+
namespace NodeExecute {
|
2948
|
+
type Params = {
|
2949
|
+
deviceId: string;
|
2950
|
+
nodeId: string;
|
2951
|
+
};
|
2952
|
+
type Options = JUHUU.RequestOptions;
|
2953
|
+
type Response = {
|
2954
|
+
device: JUHUU.Device.Object;
|
2955
|
+
};
|
2956
|
+
}
|
2946
2957
|
namespace Delete {
|
2947
2958
|
type Params = {
|
2948
2959
|
deviceId?: string;
|
package/dist/index.d.ts
CHANGED
@@ -661,6 +661,7 @@ declare class DevicesService extends Service {
|
|
661
661
|
message(DeviceMessageParams: JUHUU.Device.Message.Params, DeviceMessageOptions?: JUHUU.Device.Message.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Message.Response>>;
|
662
662
|
parameterUpdate(DeviceParameterParams: JUHUU.Device.ParameterUpdate.Params, DeviceParameterOptions?: JUHUU.Device.ParameterUpdate.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.ParameterUpdate.Response>>;
|
663
663
|
commandExecute(DeviceCommandExecuteParams: JUHUU.Device.CommandExecute.Params, DeviceCommandExecuteOptions?: JUHUU.Device.CommandExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.CommandExecute.Response>>;
|
664
|
+
nodeExecute(DeviceNodeExecuteParams: JUHUU.Device.NodeExecute.Params, DeviceNodeExecuteOptions?: JUHUU.Device.NodeExecute.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.NodeExecute.Response>>;
|
664
665
|
delete(DeviceDeleteParams: JUHUU.Device.Delete.Params, DeviceDeleteOptions?: JUHUU.Device.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Device.Delete.Response>>;
|
665
666
|
}
|
666
667
|
|
@@ -2943,6 +2944,16 @@ declare namespace JUHUU {
|
|
2943
2944
|
device: JUHUU.Device.Object;
|
2944
2945
|
};
|
2945
2946
|
}
|
2947
|
+
namespace NodeExecute {
|
2948
|
+
type Params = {
|
2949
|
+
deviceId: string;
|
2950
|
+
nodeId: string;
|
2951
|
+
};
|
2952
|
+
type Options = JUHUU.RequestOptions;
|
2953
|
+
type Response = {
|
2954
|
+
device: JUHUU.Device.Object;
|
2955
|
+
};
|
2956
|
+
}
|
2946
2957
|
namespace Delete {
|
2947
2958
|
type Params = {
|
2948
2959
|
deviceId?: string;
|
package/dist/index.js
CHANGED
@@ -114,6 +114,7 @@ var Service = class {
|
|
114
114
|
}
|
115
115
|
}
|
116
116
|
}
|
117
|
+
console.log("currentOptions", currentOptions);
|
117
118
|
let token = null;
|
118
119
|
let apiKey = null;
|
119
120
|
switch (this.authenticationMode) {
|
@@ -160,6 +161,14 @@ var Service = class {
|
|
160
161
|
const uri = this.httpBaseUrl + url;
|
161
162
|
let response = null;
|
162
163
|
let responseObject = null;
|
164
|
+
console.log(
|
165
|
+
"sending request to",
|
166
|
+
uri,
|
167
|
+
"with apiKey",
|
168
|
+
apiKey,
|
169
|
+
"and token",
|
170
|
+
token
|
171
|
+
);
|
163
172
|
try {
|
164
173
|
switch (method) {
|
165
174
|
case "GET": {
|
@@ -968,7 +977,8 @@ var PropertiesService = class extends Service {
|
|
968
977
|
primaryColor: PropertyOnboardingParams.primaryColor,
|
969
978
|
backgroundColor: PropertyOnboardingParams.backgroundColor,
|
970
979
|
logo: PropertyOnboardingParams.logo,
|
971
|
-
name: PropertyOnboardingParams.name
|
980
|
+
name: PropertyOnboardingParams.name,
|
981
|
+
eligibleToCreateOnBehalfOfBusiness: PropertyOnboardingParams.eligibleToCreateOnBehalfOfBusiness
|
972
982
|
},
|
973
983
|
authenticationNotOptional: true
|
974
984
|
},
|
@@ -1246,6 +1256,17 @@ var DevicesService = class extends Service {
|
|
1246
1256
|
DeviceCommandExecuteOptions
|
1247
1257
|
);
|
1248
1258
|
}
|
1259
|
+
async nodeExecute(DeviceNodeExecuteParams, DeviceNodeExecuteOptions) {
|
1260
|
+
return await super.sendRequest(
|
1261
|
+
{
|
1262
|
+
method: "POST",
|
1263
|
+
url: "devices/" + DeviceNodeExecuteParams.deviceId + "/node/" + DeviceNodeExecuteParams.nodeId,
|
1264
|
+
body: {},
|
1265
|
+
authenticationNotOptional: true
|
1266
|
+
},
|
1267
|
+
DeviceNodeExecuteOptions
|
1268
|
+
);
|
1269
|
+
}
|
1249
1270
|
async delete(DeviceDeleteParams, DeviceDeleteOptions) {
|
1250
1271
|
return await super.sendRequest(
|
1251
1272
|
{
|
package/dist/index.mjs
CHANGED
@@ -70,6 +70,7 @@ var Service = class {
|
|
70
70
|
}
|
71
71
|
}
|
72
72
|
}
|
73
|
+
console.log("currentOptions", currentOptions);
|
73
74
|
let token = null;
|
74
75
|
let apiKey = null;
|
75
76
|
switch (this.authenticationMode) {
|
@@ -116,6 +117,14 @@ var Service = class {
|
|
116
117
|
const uri = this.httpBaseUrl + url;
|
117
118
|
let response = null;
|
118
119
|
let responseObject = null;
|
120
|
+
console.log(
|
121
|
+
"sending request to",
|
122
|
+
uri,
|
123
|
+
"with apiKey",
|
124
|
+
apiKey,
|
125
|
+
"and token",
|
126
|
+
token
|
127
|
+
);
|
119
128
|
try {
|
120
129
|
switch (method) {
|
121
130
|
case "GET": {
|
@@ -924,7 +933,8 @@ var PropertiesService = class extends Service {
|
|
924
933
|
primaryColor: PropertyOnboardingParams.primaryColor,
|
925
934
|
backgroundColor: PropertyOnboardingParams.backgroundColor,
|
926
935
|
logo: PropertyOnboardingParams.logo,
|
927
|
-
name: PropertyOnboardingParams.name
|
936
|
+
name: PropertyOnboardingParams.name,
|
937
|
+
eligibleToCreateOnBehalfOfBusiness: PropertyOnboardingParams.eligibleToCreateOnBehalfOfBusiness
|
928
938
|
},
|
929
939
|
authenticationNotOptional: true
|
930
940
|
},
|
@@ -1202,6 +1212,17 @@ var DevicesService = class extends Service {
|
|
1202
1212
|
DeviceCommandExecuteOptions
|
1203
1213
|
);
|
1204
1214
|
}
|
1215
|
+
async nodeExecute(DeviceNodeExecuteParams, DeviceNodeExecuteOptions) {
|
1216
|
+
return await super.sendRequest(
|
1217
|
+
{
|
1218
|
+
method: "POST",
|
1219
|
+
url: "devices/" + DeviceNodeExecuteParams.deviceId + "/node/" + DeviceNodeExecuteParams.nodeId,
|
1220
|
+
body: {},
|
1221
|
+
authenticationNotOptional: true
|
1222
|
+
},
|
1223
|
+
DeviceNodeExecuteOptions
|
1224
|
+
);
|
1225
|
+
}
|
1205
1226
|
async delete(DeviceDeleteParams, DeviceDeleteOptions) {
|
1206
1227
|
return await super.sendRequest(
|
1207
1228
|
{
|