chatgraph 0.4.0__py3-none-any.whl → 0.4.2__py3-none-any.whl

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.

Potentially problematic release.


This version of chatgraph might be problematic. Click here for more details.

@@ -178,6 +178,7 @@ class MessageConsumer:
178
178
  voll_id=user_state.get('voll_id', ''),
179
179
  platform=user_state.get('platform', ''),
180
180
  obs=obs,
181
+ protocol=user_state.get('protocol', ''),
181
182
  ),
182
183
  channel=message.get('channel', ''),
183
184
  customer_phone=message.get('customer_phone', ''),
@@ -26,6 +26,7 @@ class UserState:
26
26
  voll_id: Optional[str]=None,
27
27
  lst_update: Optional[str]=None,
28
28
  obs: Optional[dict] = None,
29
+ protocol: Optional[str] = None,
29
30
  ) -> None:
30
31
 
31
32
  self.customer_id = customer_id
@@ -36,6 +37,7 @@ class UserState:
36
37
  self.direction_in = direction_in
37
38
  self.voll_id = voll_id
38
39
  self.platform = platform
40
+ self.protocol = protocol
39
41
 
40
42
  def __str__(self):
41
43
  return f"UserState:\n\tcustomer_id={self.customer_id},\n\tmenu={self.menu},\n\troute={self.route},\n\tlst_update={self.lst_update},\n\tobs={self.obs},\n\tdirection_in={self.direction_in}"
@@ -318,6 +320,26 @@ class UserCall:
318
320
  def customer_id(self):
319
321
  return self.__user_state.customer_id
320
322
 
323
+ @property
324
+ def voll_id(self):
325
+ return self.__user_state.voll_id
326
+
327
+ @property
328
+ def platform(self):
329
+ return self.__user_state.platform
330
+
331
+ @property
332
+ def direction_in(self):
333
+ return self.__user_state.direction_in
334
+
335
+ @property
336
+ def lst_update(self):
337
+ return self.__user_state.lst_update
338
+
339
+ @property
340
+ def protocol(self):
341
+ return self.__user_state.protocol
342
+
321
343
  @menu.setter
322
344
  def menu(self, menu):
323
345
 
chatgraph/types/route.py CHANGED
@@ -30,6 +30,13 @@ class Route:
30
30
  """
31
31
  return self.get_previous()
32
32
 
33
+ @property
34
+ def current_node(self)->str:
35
+ """
36
+ Retorna o nó atual do usuário
37
+ """
38
+ return self.current.split(self.separator)[-1]
39
+
33
40
  def get_previous(self) -> 'Route':
34
41
  """
35
42
  Retorna o caminho anterior ao caminho atual.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chatgraph
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: A user-friendly chatbot library
5
5
  Home-page: https://github.com/irissonnlima/chatgraph
6
6
  License: MIT
@@ -6,7 +6,7 @@ chatgraph/cli/__init__.py,sha256=tfgYhGoKy1nD4STN4xDh6J4VV55RICk7v1GZmzAg-bM,741
6
6
  chatgraph/error/chatbot_error.py,sha256=4sEcW8vz0eQk2QDmDygucVM4caHliZW5iH7XJvmLBuk,1897
7
7
  chatgraph/error/route_error.py,sha256=CY8m82ap7-Sr-DXPsolltRW50TqD__5RyXBmNNJCWr8,793
8
8
  chatgraph/gRPC/gRPCCall.py,sha256=jYZg7CvtKWhtv2sQMrSunSmvnnL83MKmNVO8GWmGZ9U,7696
9
- chatgraph/messages/message_consumer.py,sha256=DYPZA-TTXe4jtcdRZUSfPf-QO0B_aXUzSO3FSwfhWlo,8996
9
+ chatgraph/messages/message_consumer.py,sha256=B6ettgby39r1pUw6KyiUlpzXPy5nhFAJiye54Lckoqs,9054
10
10
  chatgraph/pb/userstate.proto,sha256=GgjD1K2t8VxrMLkceVnY043xBdXWTPxBzaBhAbAg7yw,859
11
11
  chatgraph/pb/userstate_pb2.py,sha256=aCS_Muk_uA78buV28g7yi0O2vriTJedT4HKxgzFFUVw,2856
12
12
  chatgraph/pb/userstate_pb2_grpc.py,sha256=QJEGEmdBL6bkxrTI-gNhGbZpPUFuP5jm7eFu8y21PMI,10340
@@ -15,10 +15,10 @@ chatgraph/pb/voll_pb2.py,sha256=WLwE7F1pe_elcnwRnSFqVDcFihLZ3JBq4ScTHNCqWGA,5328
15
15
  chatgraph/pb/voll_pb2_grpc.py,sha256=U-_nXTAIEzo2GMYjHiphbSyTx3zyipsnKebFuZuoU1k,17685
16
16
  chatgraph/types/end_types.py,sha256=--Ty2gM_y7J-yRAvZV26e4HMUpoguAMAhfOIS9-kQTk,1316
17
17
  chatgraph/types/message_types.py,sha256=l488K4sVhTdOY5bbk47Y-qjfvfyn4h7bpmOFf2xGods,3334
18
- chatgraph/types/request_types.py,sha256=Rju__bOLI3AG-l5aYTNv_SwqH_-pu1tNiiHA9PujN_M,11761
19
- chatgraph/types/route.py,sha256=ifOHZgb1DU556ad4PJBKJ7iBYjCq2GjqaC5YAdxP0D8,2801
20
- chatgraph-0.4.0.dist-info/entry_points.txt,sha256=bO9_Q-PqE5vCNNo6ke_-3j2gHfKQMDGnKDTkNuCdBuA,48
21
- chatgraph-0.4.0.dist-info/LICENSE,sha256=rVJozpRzDlplOpvI8A1GvmfVS0ReYdZvMWc1j2jV0v8,1090
22
- chatgraph-0.4.0.dist-info/METADATA,sha256=yo_f4Twk9QiEyRqqQQOWgZph0RjnnegCJzzaJPsLtzM,12866
23
- chatgraph-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
- chatgraph-0.4.0.dist-info/RECORD,,
18
+ chatgraph/types/request_types.py,sha256=J3bTgudLY0ewKhji3sToMQRTGIsEPk5XRbe6NcTc6gg,12291
19
+ chatgraph/types/route.py,sha256=FO5INy5UXgicuQ8FKEZKcPv6WS5YH10dPx2OaPu_0sE,2978
20
+ chatgraph-0.4.2.dist-info/entry_points.txt,sha256=bO9_Q-PqE5vCNNo6ke_-3j2gHfKQMDGnKDTkNuCdBuA,48
21
+ chatgraph-0.4.2.dist-info/LICENSE,sha256=rVJozpRzDlplOpvI8A1GvmfVS0ReYdZvMWc1j2jV0v8,1090
22
+ chatgraph-0.4.2.dist-info/METADATA,sha256=ACCP5357txccMaenm4e5VV8uWScCjk7sV466pTFxVO8,12866
23
+ chatgraph-0.4.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
+ chatgraph-0.4.2.dist-info/RECORD,,