@motiadev/core 0.5.11-beta.120-110250 → 0.5.11-beta.120-598191

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.
@@ -19,6 +19,20 @@ class RpcStateManager:
19
19
  return {'data': result}
20
20
 
21
21
  return result
22
+
23
+ async def get_group(self, group_id: str) -> asyncio.Future[Any]:
24
+ result = await self.rpc.send('state.getGroup', {'groupId': group_id})
25
+
26
+ if result is None:
27
+ return {'data': None}
28
+ elif isinstance(result, dict):
29
+ if 'data' not in result:
30
+ return {'data': result}
31
+
32
+ return result
33
+
34
+ async def getGroup(self, trace_id: str, key: str) -> asyncio.Future[Any]:
35
+ return await self.get_group(trace_id, key)
22
36
 
23
37
  async def set(self, trace_id: str, key: str, value: Any) -> asyncio.Future[None]:
24
38
  future = await self.rpc.send('state.set', {'traceId': trace_id, 'key': key, 'value': value})
@@ -23,6 +23,9 @@ class RpcStreamManager:
23
23
 
24
24
  async def getGroup(self, group_id: str) -> asyncio.Future[None]:
25
25
  return await self.rpc.send(f'streams.{self.stream_name}.getGroup', {'groupId': group_id})
26
+
27
+ async def get_group(self, group_id: str) -> asyncio.Future[None]:
28
+ return await self.getGroup(group_id)
26
29
 
27
30
  async def send(self, channel: Dict, event: Dict) -> asyncio.Future[None]:
28
31
  return await self.rpc.send(f'streams.{self.stream_name}.send', {'channel': channel, 'event': event})
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@motiadev/core",
3
3
  "description": "Core functionality for the Motia framework, providing the foundation for building event-driven workflows.",
4
4
  "main": "dist/index.js",
5
- "version": "0.5.11-beta.120-110250",
5
+ "version": "0.5.11-beta.120-598191",
6
6
  "dependencies": {
7
7
  "@amplitude/analytics-node": "^1.3.8",
8
8
  "body-parser": "^1.20.3",