@juhuu/sdk-ts 1.2.271 → 1.2.272
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 +26 -38
- package/dist/index.d.ts +26 -38
- package/dist/index.js +44 -25
- package/dist/index.mjs +44 -25
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -54,6 +54,11 @@ type Capability = {
|
|
|
54
54
|
stripePriceId: string | null;
|
|
55
55
|
grantedAt: Date;
|
|
56
56
|
requestedByUserId: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "identityVerification";
|
|
59
|
+
stripePriceId: string | null;
|
|
60
|
+
grantedAt: Date;
|
|
61
|
+
requestedByUserId: string;
|
|
57
62
|
};
|
|
58
63
|
interface Offer {
|
|
59
64
|
tariffId: string;
|
|
@@ -67,6 +72,7 @@ interface Offer {
|
|
|
67
72
|
*/
|
|
68
73
|
licenseTemplateCascadeArray?: string[][];
|
|
69
74
|
offerTime: OfferTime;
|
|
75
|
+
flowId?: string | null;
|
|
70
76
|
}
|
|
71
77
|
type DevicePermission = {
|
|
72
78
|
type: "bluetooth";
|
|
@@ -6475,47 +6481,29 @@ declare namespace JUHUU {
|
|
|
6475
6481
|
type Params = {};
|
|
6476
6482
|
type Options = JUHUU.RequestOptions;
|
|
6477
6483
|
type Response = {
|
|
6478
|
-
subscribe: (
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
+
subscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
|
|
6485
|
+
unsubscribeFromLocations: (locationIdArray: string[]) => void;
|
|
6486
|
+
unsubscribeFromParameters: (parameterIdArray: string[]) => void;
|
|
6487
|
+
unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
|
|
6488
|
+
ping: (data?: any) => void;
|
|
6489
|
+
onLocationUpdate: (callback: (message: JUHUU.Websocket.LocationUpdate) => void) => void;
|
|
6490
|
+
onParameterUpdate: (callback: (message: JUHUU.Websocket.ParameterUpdate) => void) => void;
|
|
6491
|
+
onPong: (callback: (message: any) => void) => void;
|
|
6484
6492
|
close: () => void;
|
|
6485
6493
|
};
|
|
6486
6494
|
}
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
}
|
|
6500
|
-
namespace Rpc {
|
|
6501
|
-
type Params = {
|
|
6502
|
-
id: string;
|
|
6503
|
-
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
6504
|
-
path: string;
|
|
6505
|
-
query?: Record<string, unknown>;
|
|
6506
|
-
body?: unknown;
|
|
6507
|
-
headers?: Record<string, unknown>;
|
|
6508
|
-
};
|
|
6509
|
-
type Response = {
|
|
6510
|
-
id: string;
|
|
6511
|
-
status: number;
|
|
6512
|
-
data?: unknown;
|
|
6513
|
-
error?: unknown;
|
|
6514
|
-
};
|
|
6515
|
-
}
|
|
6516
|
-
type QueryUpdate = {
|
|
6517
|
-
subId: string;
|
|
6518
|
-
data: unknown;
|
|
6495
|
+
type LocationUpdate = {
|
|
6496
|
+
locationId: string;
|
|
6497
|
+
before: JUHUU.Location.Object;
|
|
6498
|
+
after: JUHUU.Location.Object;
|
|
6499
|
+
changedFields: string[];
|
|
6500
|
+
};
|
|
6501
|
+
type ParameterUpdate = {
|
|
6502
|
+
parameterId: string;
|
|
6503
|
+
before: JUHUU.Parameter.Object;
|
|
6504
|
+
after: JUHUU.Parameter.Object;
|
|
6505
|
+
changedFields: string[];
|
|
6506
|
+
initiatedAt?: Date;
|
|
6519
6507
|
};
|
|
6520
6508
|
}
|
|
6521
6509
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ type Capability = {
|
|
|
54
54
|
stripePriceId: string | null;
|
|
55
55
|
grantedAt: Date;
|
|
56
56
|
requestedByUserId: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "identityVerification";
|
|
59
|
+
stripePriceId: string | null;
|
|
60
|
+
grantedAt: Date;
|
|
61
|
+
requestedByUserId: string;
|
|
57
62
|
};
|
|
58
63
|
interface Offer {
|
|
59
64
|
tariffId: string;
|
|
@@ -67,6 +72,7 @@ interface Offer {
|
|
|
67
72
|
*/
|
|
68
73
|
licenseTemplateCascadeArray?: string[][];
|
|
69
74
|
offerTime: OfferTime;
|
|
75
|
+
flowId?: string | null;
|
|
70
76
|
}
|
|
71
77
|
type DevicePermission = {
|
|
72
78
|
type: "bluetooth";
|
|
@@ -6475,47 +6481,29 @@ declare namespace JUHUU {
|
|
|
6475
6481
|
type Params = {};
|
|
6476
6482
|
type Options = JUHUU.RequestOptions;
|
|
6477
6483
|
type Response = {
|
|
6478
|
-
subscribe: (
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
+
subscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
|
|
6485
|
+
unsubscribeFromLocations: (locationIdArray: string[]) => void;
|
|
6486
|
+
unsubscribeFromParameters: (parameterIdArray: string[]) => void;
|
|
6487
|
+
unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
|
|
6488
|
+
ping: (data?: any) => void;
|
|
6489
|
+
onLocationUpdate: (callback: (message: JUHUU.Websocket.LocationUpdate) => void) => void;
|
|
6490
|
+
onParameterUpdate: (callback: (message: JUHUU.Websocket.ParameterUpdate) => void) => void;
|
|
6491
|
+
onPong: (callback: (message: any) => void) => void;
|
|
6484
6492
|
close: () => void;
|
|
6485
6493
|
};
|
|
6486
6494
|
}
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
}
|
|
6500
|
-
namespace Rpc {
|
|
6501
|
-
type Params = {
|
|
6502
|
-
id: string;
|
|
6503
|
-
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
6504
|
-
path: string;
|
|
6505
|
-
query?: Record<string, unknown>;
|
|
6506
|
-
body?: unknown;
|
|
6507
|
-
headers?: Record<string, unknown>;
|
|
6508
|
-
};
|
|
6509
|
-
type Response = {
|
|
6510
|
-
id: string;
|
|
6511
|
-
status: number;
|
|
6512
|
-
data?: unknown;
|
|
6513
|
-
error?: unknown;
|
|
6514
|
-
};
|
|
6515
|
-
}
|
|
6516
|
-
type QueryUpdate = {
|
|
6517
|
-
subId: string;
|
|
6518
|
-
data: unknown;
|
|
6495
|
+
type LocationUpdate = {
|
|
6496
|
+
locationId: string;
|
|
6497
|
+
before: JUHUU.Location.Object;
|
|
6498
|
+
after: JUHUU.Location.Object;
|
|
6499
|
+
changedFields: string[];
|
|
6500
|
+
};
|
|
6501
|
+
type ParameterUpdate = {
|
|
6502
|
+
parameterId: string;
|
|
6503
|
+
before: JUHUU.Parameter.Object;
|
|
6504
|
+
after: JUHUU.Parameter.Object;
|
|
6505
|
+
changedFields: string[];
|
|
6506
|
+
initiatedAt?: Date;
|
|
6519
6507
|
};
|
|
6520
6508
|
}
|
|
6521
6509
|
}
|
package/dist/index.js
CHANGED
|
@@ -2004,39 +2004,58 @@ var WebsocketsService = class extends Service {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
connect(WebsocketConnectOptions) {
|
|
2006
2006
|
const socket = super.connectToWebsocket({ url: "websocket" });
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
const resolver = pendingRpcResponses.get(message.id);
|
|
2010
|
-
if (resolver !== void 0) {
|
|
2011
|
-
resolver(message);
|
|
2012
|
-
pendingRpcResponses.delete(message.id);
|
|
2013
|
-
}
|
|
2007
|
+
socket.on("subscription_success", (message) => {
|
|
2008
|
+
this.logger("Subscription success:", message);
|
|
2014
2009
|
});
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2010
|
+
socket.on("unsubscription_success", (message) => {
|
|
2011
|
+
this.logger("Unsubscription success:", message);
|
|
2012
|
+
});
|
|
2013
|
+
socket.on("error", (error) => {
|
|
2014
|
+
console.error("WebSocket error:", error);
|
|
2015
|
+
});
|
|
2016
|
+
const onLocationUpdate = (callback) => {
|
|
2017
|
+
socket.on(
|
|
2018
|
+
"location_update",
|
|
2019
|
+
(message) => {
|
|
2020
|
+
callback(message);
|
|
2021
|
+
}
|
|
2022
|
+
);
|
|
2023
|
+
};
|
|
2024
|
+
const onParameterUpdate = (callback) => {
|
|
2025
|
+
socket.on(
|
|
2026
|
+
"parameter_update",
|
|
2027
|
+
(message) => {
|
|
2028
|
+
callback(message);
|
|
2029
|
+
}
|
|
2030
|
+
);
|
|
2019
2031
|
};
|
|
2020
2032
|
return {
|
|
2021
|
-
subscribe: (
|
|
2022
|
-
socket.emit("subscribe", {
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2033
|
+
subscribe: (locationIdArray, parameterIdArray) => {
|
|
2034
|
+
socket.emit("subscribe", {
|
|
2035
|
+
locationIdArray: locationIdArray || [],
|
|
2036
|
+
parameterIdArray: parameterIdArray || []
|
|
2037
|
+
});
|
|
2026
2038
|
},
|
|
2027
|
-
|
|
2028
|
-
socket.emit("
|
|
2039
|
+
unsubscribeFromLocations: (locationIdArray) => {
|
|
2040
|
+
socket.emit("unsubscribe", { locationIdArray });
|
|
2029
2041
|
},
|
|
2030
|
-
|
|
2031
|
-
socket.emit("
|
|
2042
|
+
unsubscribeFromParameters: (parameterIdArray) => {
|
|
2043
|
+
socket.emit("unsubscribe", { parameterIdArray });
|
|
2032
2044
|
},
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2045
|
+
unsubscribe: (locationIdArray, parameterIdArray) => {
|
|
2046
|
+
socket.emit("unsubscribe", {
|
|
2047
|
+
locationIdArray: locationIdArray || [],
|
|
2048
|
+
parameterIdArray: parameterIdArray || []
|
|
2037
2049
|
});
|
|
2038
2050
|
},
|
|
2039
|
-
|
|
2051
|
+
ping: (data) => {
|
|
2052
|
+
socket.emit("ping", data);
|
|
2053
|
+
},
|
|
2054
|
+
onLocationUpdate,
|
|
2055
|
+
onParameterUpdate,
|
|
2056
|
+
onPong: (callback) => {
|
|
2057
|
+
socket.on("pong", callback);
|
|
2058
|
+
},
|
|
2040
2059
|
close: () => {
|
|
2041
2060
|
socket.close();
|
|
2042
2061
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1960,39 +1960,58 @@ var WebsocketsService = class extends Service {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
connect(WebsocketConnectOptions) {
|
|
1962
1962
|
const socket = super.connectToWebsocket({ url: "websocket" });
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
const resolver = pendingRpcResponses.get(message.id);
|
|
1966
|
-
if (resolver !== void 0) {
|
|
1967
|
-
resolver(message);
|
|
1968
|
-
pendingRpcResponses.delete(message.id);
|
|
1969
|
-
}
|
|
1963
|
+
socket.on("subscription_success", (message) => {
|
|
1964
|
+
this.logger("Subscription success:", message);
|
|
1970
1965
|
});
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1966
|
+
socket.on("unsubscription_success", (message) => {
|
|
1967
|
+
this.logger("Unsubscription success:", message);
|
|
1968
|
+
});
|
|
1969
|
+
socket.on("error", (error) => {
|
|
1970
|
+
console.error("WebSocket error:", error);
|
|
1971
|
+
});
|
|
1972
|
+
const onLocationUpdate = (callback) => {
|
|
1973
|
+
socket.on(
|
|
1974
|
+
"location_update",
|
|
1975
|
+
(message) => {
|
|
1976
|
+
callback(message);
|
|
1977
|
+
}
|
|
1978
|
+
);
|
|
1979
|
+
};
|
|
1980
|
+
const onParameterUpdate = (callback) => {
|
|
1981
|
+
socket.on(
|
|
1982
|
+
"parameter_update",
|
|
1983
|
+
(message) => {
|
|
1984
|
+
callback(message);
|
|
1985
|
+
}
|
|
1986
|
+
);
|
|
1975
1987
|
};
|
|
1976
1988
|
return {
|
|
1977
|
-
subscribe: (
|
|
1978
|
-
socket.emit("subscribe", {
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1989
|
+
subscribe: (locationIdArray, parameterIdArray) => {
|
|
1990
|
+
socket.emit("subscribe", {
|
|
1991
|
+
locationIdArray: locationIdArray || [],
|
|
1992
|
+
parameterIdArray: parameterIdArray || []
|
|
1993
|
+
});
|
|
1982
1994
|
},
|
|
1983
|
-
|
|
1984
|
-
socket.emit("
|
|
1995
|
+
unsubscribeFromLocations: (locationIdArray) => {
|
|
1996
|
+
socket.emit("unsubscribe", { locationIdArray });
|
|
1985
1997
|
},
|
|
1986
|
-
|
|
1987
|
-
socket.emit("
|
|
1998
|
+
unsubscribeFromParameters: (parameterIdArray) => {
|
|
1999
|
+
socket.emit("unsubscribe", { parameterIdArray });
|
|
1988
2000
|
},
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2001
|
+
unsubscribe: (locationIdArray, parameterIdArray) => {
|
|
2002
|
+
socket.emit("unsubscribe", {
|
|
2003
|
+
locationIdArray: locationIdArray || [],
|
|
2004
|
+
parameterIdArray: parameterIdArray || []
|
|
1993
2005
|
});
|
|
1994
2006
|
},
|
|
1995
|
-
|
|
2007
|
+
ping: (data) => {
|
|
2008
|
+
socket.emit("ping", data);
|
|
2009
|
+
},
|
|
2010
|
+
onLocationUpdate,
|
|
2011
|
+
onParameterUpdate,
|
|
2012
|
+
onPong: (callback) => {
|
|
2013
|
+
socket.on("pong", callback);
|
|
2014
|
+
},
|
|
1996
2015
|
close: () => {
|
|
1997
2016
|
socket.close();
|
|
1998
2017
|
}
|