@juhuu/sdk-ts 1.2.282 → 1.2.284
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +17 -11
- package/dist/index.mjs +17 -11
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -920,19 +920,19 @@ interface SystemLogBlockInputs {
|
|
|
920
920
|
interface UiNavigateScreenBlock extends BaseBlock {
|
|
921
921
|
type: "ui.navigate.screen";
|
|
922
922
|
in: {
|
|
923
|
-
|
|
923
|
+
screenName: DataEdgeConnection;
|
|
924
924
|
transition: DataEdgeConnection;
|
|
925
925
|
params: DataEdgeConnection;
|
|
926
926
|
};
|
|
927
927
|
out: Record<string, never>;
|
|
928
928
|
data: {
|
|
929
|
-
|
|
929
|
+
screenName?: string;
|
|
930
930
|
transition?: "push" | "replace";
|
|
931
931
|
params?: Record<string, any>;
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
934
|
interface UiNavigateScreenBlockInputs {
|
|
935
|
-
|
|
935
|
+
screenName: string;
|
|
936
936
|
transition: "push" | "replace";
|
|
937
937
|
params: Record<string, any>;
|
|
938
938
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -920,19 +920,19 @@ interface SystemLogBlockInputs {
|
|
|
920
920
|
interface UiNavigateScreenBlock extends BaseBlock {
|
|
921
921
|
type: "ui.navigate.screen";
|
|
922
922
|
in: {
|
|
923
|
-
|
|
923
|
+
screenName: DataEdgeConnection;
|
|
924
924
|
transition: DataEdgeConnection;
|
|
925
925
|
params: DataEdgeConnection;
|
|
926
926
|
};
|
|
927
927
|
out: Record<string, never>;
|
|
928
928
|
data: {
|
|
929
|
-
|
|
929
|
+
screenName?: string;
|
|
930
930
|
transition?: "push" | "replace";
|
|
931
931
|
params?: Record<string, any>;
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
934
|
interface UiNavigateScreenBlockInputs {
|
|
935
|
-
|
|
935
|
+
screenName: string;
|
|
936
936
|
transition: "push" | "replace";
|
|
937
937
|
params: Record<string, any>;
|
|
938
938
|
}
|
package/dist/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var Service = class {
|
|
|
137
137
|
}
|
|
138
138
|
this.logger("accessToken:", token);
|
|
139
139
|
if ((token === null || token === void 0) && authenticationNotOptional === true) {
|
|
140
|
-
|
|
140
|
+
this.logger(
|
|
141
141
|
"endpoint",
|
|
142
142
|
url,
|
|
143
143
|
"should use authentication but no token was found"
|
|
@@ -156,7 +156,7 @@ var Service = class {
|
|
|
156
156
|
apiKey = currentRequestOptions.apiKey;
|
|
157
157
|
}
|
|
158
158
|
if (apiKey === null) {
|
|
159
|
-
|
|
159
|
+
this.logger(
|
|
160
160
|
"endpoint",
|
|
161
161
|
url,
|
|
162
162
|
"should use authentication but no apiKey was found"
|
|
@@ -209,7 +209,7 @@ var Service = class {
|
|
|
209
209
|
status: response.status
|
|
210
210
|
};
|
|
211
211
|
} catch (error) {
|
|
212
|
-
|
|
212
|
+
this.logger("JUHUU SDK, error sending request: ", error);
|
|
213
213
|
responseObject = {
|
|
214
214
|
ok: false,
|
|
215
215
|
data: await response?.json(),
|
|
@@ -380,7 +380,7 @@ var Service = class {
|
|
|
380
380
|
this.logger("connected to websocket", uri);
|
|
381
381
|
});
|
|
382
382
|
socket.on("connect_error", (error) => {
|
|
383
|
-
|
|
383
|
+
this.logger("Connection error:", error);
|
|
384
384
|
});
|
|
385
385
|
return socket;
|
|
386
386
|
}
|
|
@@ -2008,14 +2008,20 @@ var WebsocketsService = class extends Service {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
connect(WebsocketConnectOptions) {
|
|
2010
2010
|
const socket = super.connectToWebsocket({ url: "websocket" });
|
|
2011
|
-
socket.on(
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2011
|
+
socket.on(
|
|
2012
|
+
"subscription_success",
|
|
2013
|
+
(message) => {
|
|
2014
|
+
this.logger("Subscription success:", message);
|
|
2015
|
+
}
|
|
2016
|
+
);
|
|
2017
|
+
socket.on(
|
|
2018
|
+
"unsubscription_success",
|
|
2019
|
+
(message) => {
|
|
2020
|
+
this.logger("Unsubscription success:", message);
|
|
2021
|
+
}
|
|
2022
|
+
);
|
|
2017
2023
|
socket.on("error", (error) => {
|
|
2018
|
-
|
|
2024
|
+
this.logger("WebSocket error:", error);
|
|
2019
2025
|
});
|
|
2020
2026
|
const onLocationUpdate = (callback) => {
|
|
2021
2027
|
socket.on(
|
package/dist/index.mjs
CHANGED
|
@@ -93,7 +93,7 @@ var Service = class {
|
|
|
93
93
|
}
|
|
94
94
|
this.logger("accessToken:", token);
|
|
95
95
|
if ((token === null || token === void 0) && authenticationNotOptional === true) {
|
|
96
|
-
|
|
96
|
+
this.logger(
|
|
97
97
|
"endpoint",
|
|
98
98
|
url,
|
|
99
99
|
"should use authentication but no token was found"
|
|
@@ -112,7 +112,7 @@ var Service = class {
|
|
|
112
112
|
apiKey = currentRequestOptions.apiKey;
|
|
113
113
|
}
|
|
114
114
|
if (apiKey === null) {
|
|
115
|
-
|
|
115
|
+
this.logger(
|
|
116
116
|
"endpoint",
|
|
117
117
|
url,
|
|
118
118
|
"should use authentication but no apiKey was found"
|
|
@@ -165,7 +165,7 @@ var Service = class {
|
|
|
165
165
|
status: response.status
|
|
166
166
|
};
|
|
167
167
|
} catch (error) {
|
|
168
|
-
|
|
168
|
+
this.logger("JUHUU SDK, error sending request: ", error);
|
|
169
169
|
responseObject = {
|
|
170
170
|
ok: false,
|
|
171
171
|
data: await response?.json(),
|
|
@@ -336,7 +336,7 @@ var Service = class {
|
|
|
336
336
|
this.logger("connected to websocket", uri);
|
|
337
337
|
});
|
|
338
338
|
socket.on("connect_error", (error) => {
|
|
339
|
-
|
|
339
|
+
this.logger("Connection error:", error);
|
|
340
340
|
});
|
|
341
341
|
return socket;
|
|
342
342
|
}
|
|
@@ -1964,14 +1964,20 @@ var WebsocketsService = class extends Service {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
connect(WebsocketConnectOptions) {
|
|
1966
1966
|
const socket = super.connectToWebsocket({ url: "websocket" });
|
|
1967
|
-
socket.on(
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1967
|
+
socket.on(
|
|
1968
|
+
"subscription_success",
|
|
1969
|
+
(message) => {
|
|
1970
|
+
this.logger("Subscription success:", message);
|
|
1971
|
+
}
|
|
1972
|
+
);
|
|
1973
|
+
socket.on(
|
|
1974
|
+
"unsubscription_success",
|
|
1975
|
+
(message) => {
|
|
1976
|
+
this.logger("Unsubscription success:", message);
|
|
1977
|
+
}
|
|
1978
|
+
);
|
|
1973
1979
|
socket.on("error", (error) => {
|
|
1974
|
-
|
|
1980
|
+
this.logger("WebSocket error:", error);
|
|
1975
1981
|
});
|
|
1976
1982
|
const onLocationUpdate = (callback) => {
|
|
1977
1983
|
socket.on(
|