@juhuu/sdk-ts 1.2.286 → 1.2.287

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
@@ -6550,13 +6550,15 @@ declare namespace JUHUU {
6550
6550
  type Params = {};
6551
6551
  type Options = JUHUU.RequestOptions;
6552
6552
  type Response = {
6553
- subscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
6553
+ subscribe: (locationIdArray?: string[], parameterIdArray?: string[], sessionIdArray?: string[]) => void;
6554
6554
  unsubscribeFromLocations: (locationIdArray: string[]) => void;
6555
6555
  unsubscribeFromParameters: (parameterIdArray: string[]) => void;
6556
- unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
6556
+ unsubscribeFromSessions: (sessionIdArray: string[]) => void;
6557
+ unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[], sessionIdArray?: string[]) => void;
6557
6558
  ping: (data?: any) => void;
6558
6559
  onLocationUpdate: (callback: (message: JUHUU.Websocket.LocationUpdate) => void) => void;
6559
6560
  onParameterUpdate: (callback: (message: JUHUU.Websocket.ParameterUpdate) => void) => void;
6561
+ onSessionUpdate: (callback: (message: JUHUU.Websocket.SessionUpdate) => void) => void;
6560
6562
  onPong: (callback: (message: any) => void) => void;
6561
6563
  close: () => void;
6562
6564
  };
@@ -6574,11 +6576,18 @@ declare namespace JUHUU {
6574
6576
  changedFields: string[];
6575
6577
  initiatedAt?: Date;
6576
6578
  };
6579
+ type SessionUpdate = {
6580
+ sessionId: string;
6581
+ before: JUHUU.Session.Object;
6582
+ after: JUHUU.Session.Object;
6583
+ changedFields: string[];
6584
+ };
6577
6585
  type SubscriptionSuccess = {
6578
6586
  locationIdArray: string[];
6579
6587
  parameterIdArray: string[];
6588
+ sessionIdArray: string[];
6580
6589
  subscriptionResultArray: Array<{
6581
- type: "location" | "parameter";
6590
+ type: "location" | "parameter" | "session";
6582
6591
  id: string;
6583
6592
  roomName: string;
6584
6593
  success: boolean;
@@ -6588,8 +6597,9 @@ declare namespace JUHUU {
6588
6597
  type UnsubscriptionSuccess = {
6589
6598
  locationIdArray: string[];
6590
6599
  parameterIdArray: string[];
6600
+ sessionIdArray: string[];
6591
6601
  unsubscriptionResultArray: Array<{
6592
- type: "location" | "parameter";
6602
+ type: "location" | "parameter" | "session";
6593
6603
  id: string;
6594
6604
  roomName: string;
6595
6605
  success: boolean;
package/dist/index.d.ts CHANGED
@@ -6550,13 +6550,15 @@ declare namespace JUHUU {
6550
6550
  type Params = {};
6551
6551
  type Options = JUHUU.RequestOptions;
6552
6552
  type Response = {
6553
- subscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
6553
+ subscribe: (locationIdArray?: string[], parameterIdArray?: string[], sessionIdArray?: string[]) => void;
6554
6554
  unsubscribeFromLocations: (locationIdArray: string[]) => void;
6555
6555
  unsubscribeFromParameters: (parameterIdArray: string[]) => void;
6556
- unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[]) => void;
6556
+ unsubscribeFromSessions: (sessionIdArray: string[]) => void;
6557
+ unsubscribe: (locationIdArray?: string[], parameterIdArray?: string[], sessionIdArray?: string[]) => void;
6557
6558
  ping: (data?: any) => void;
6558
6559
  onLocationUpdate: (callback: (message: JUHUU.Websocket.LocationUpdate) => void) => void;
6559
6560
  onParameterUpdate: (callback: (message: JUHUU.Websocket.ParameterUpdate) => void) => void;
6561
+ onSessionUpdate: (callback: (message: JUHUU.Websocket.SessionUpdate) => void) => void;
6560
6562
  onPong: (callback: (message: any) => void) => void;
6561
6563
  close: () => void;
6562
6564
  };
@@ -6574,11 +6576,18 @@ declare namespace JUHUU {
6574
6576
  changedFields: string[];
6575
6577
  initiatedAt?: Date;
6576
6578
  };
6579
+ type SessionUpdate = {
6580
+ sessionId: string;
6581
+ before: JUHUU.Session.Object;
6582
+ after: JUHUU.Session.Object;
6583
+ changedFields: string[];
6584
+ };
6577
6585
  type SubscriptionSuccess = {
6578
6586
  locationIdArray: string[];
6579
6587
  parameterIdArray: string[];
6588
+ sessionIdArray: string[];
6580
6589
  subscriptionResultArray: Array<{
6581
- type: "location" | "parameter";
6590
+ type: "location" | "parameter" | "session";
6582
6591
  id: string;
6583
6592
  roomName: string;
6584
6593
  success: boolean;
@@ -6588,8 +6597,9 @@ declare namespace JUHUU {
6588
6597
  type UnsubscriptionSuccess = {
6589
6598
  locationIdArray: string[];
6590
6599
  parameterIdArray: string[];
6600
+ sessionIdArray: string[];
6591
6601
  unsubscriptionResultArray: Array<{
6592
- type: "location" | "parameter";
6602
+ type: "location" | "parameter" | "session";
6593
6603
  id: string;
6594
6604
  roomName: string;
6595
6605
  success: boolean;
package/dist/index.js CHANGED
@@ -2041,11 +2041,20 @@ var WebsocketsService = class extends Service {
2041
2041
  }
2042
2042
  );
2043
2043
  };
2044
+ const onSessionUpdate = (callback) => {
2045
+ socket.on(
2046
+ "session_update",
2047
+ (message) => {
2048
+ callback(message);
2049
+ }
2050
+ );
2051
+ };
2044
2052
  return {
2045
- subscribe: (locationIdArray, parameterIdArray) => {
2053
+ subscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2046
2054
  socket.emit("subscribe", {
2047
2055
  locationIdArray: locationIdArray || [],
2048
- parameterIdArray: parameterIdArray || []
2056
+ parameterIdArray: parameterIdArray || [],
2057
+ sessionIdArray: sessionIdArray || []
2049
2058
  });
2050
2059
  },
2051
2060
  unsubscribeFromLocations: (locationIdArray) => {
@@ -2054,10 +2063,14 @@ var WebsocketsService = class extends Service {
2054
2063
  unsubscribeFromParameters: (parameterIdArray) => {
2055
2064
  socket.emit("unsubscribe", { parameterIdArray });
2056
2065
  },
2057
- unsubscribe: (locationIdArray, parameterIdArray) => {
2066
+ unsubscribeFromSessions: (sessionIdArray) => {
2067
+ socket.emit("unsubscribe", { sessionIdArray });
2068
+ },
2069
+ unsubscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2058
2070
  socket.emit("unsubscribe", {
2059
2071
  locationIdArray: locationIdArray || [],
2060
- parameterIdArray: parameterIdArray || []
2072
+ parameterIdArray: parameterIdArray || [],
2073
+ sessionIdArray: sessionIdArray || []
2061
2074
  });
2062
2075
  },
2063
2076
  ping: (data) => {
@@ -2065,6 +2078,7 @@ var WebsocketsService = class extends Service {
2065
2078
  },
2066
2079
  onLocationUpdate,
2067
2080
  onParameterUpdate,
2081
+ onSessionUpdate,
2068
2082
  onPong: (callback) => {
2069
2083
  socket.on("pong", callback);
2070
2084
  },
package/dist/index.mjs CHANGED
@@ -1997,11 +1997,20 @@ var WebsocketsService = class extends Service {
1997
1997
  }
1998
1998
  );
1999
1999
  };
2000
+ const onSessionUpdate = (callback) => {
2001
+ socket.on(
2002
+ "session_update",
2003
+ (message) => {
2004
+ callback(message);
2005
+ }
2006
+ );
2007
+ };
2000
2008
  return {
2001
- subscribe: (locationIdArray, parameterIdArray) => {
2009
+ subscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2002
2010
  socket.emit("subscribe", {
2003
2011
  locationIdArray: locationIdArray || [],
2004
- parameterIdArray: parameterIdArray || []
2012
+ parameterIdArray: parameterIdArray || [],
2013
+ sessionIdArray: sessionIdArray || []
2005
2014
  });
2006
2015
  },
2007
2016
  unsubscribeFromLocations: (locationIdArray) => {
@@ -2010,10 +2019,14 @@ var WebsocketsService = class extends Service {
2010
2019
  unsubscribeFromParameters: (parameterIdArray) => {
2011
2020
  socket.emit("unsubscribe", { parameterIdArray });
2012
2021
  },
2013
- unsubscribe: (locationIdArray, parameterIdArray) => {
2022
+ unsubscribeFromSessions: (sessionIdArray) => {
2023
+ socket.emit("unsubscribe", { sessionIdArray });
2024
+ },
2025
+ unsubscribe: (locationIdArray, parameterIdArray, sessionIdArray) => {
2014
2026
  socket.emit("unsubscribe", {
2015
2027
  locationIdArray: locationIdArray || [],
2016
- parameterIdArray: parameterIdArray || []
2028
+ parameterIdArray: parameterIdArray || [],
2029
+ sessionIdArray: sessionIdArray || []
2017
2030
  });
2018
2031
  },
2019
2032
  ping: (data) => {
@@ -2021,6 +2034,7 @@ var WebsocketsService = class extends Service {
2021
2034
  },
2022
2035
  onLocationUpdate,
2023
2036
  onParameterUpdate,
2037
+ onSessionUpdate,
2024
2038
  onPong: (callback) => {
2025
2039
  socket.on("pong", callback);
2026
2040
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.286",
3
+ "version": "1.2.287",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",