chatgraph 0.4.0__py3-none-any.whl → 0.4.1__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}"
@@ -53,6 +55,7 @@ class UserState:
53
55
  'direction': self.direction_in,
54
56
  'voll_id': self.voll_id,
55
57
  'platform': self.platform,
58
+ 'protocol': self.protocol,
56
59
  })
57
60
 
58
61
  def update(self, grpc_uri: Optional[str] = None) -> None:
@@ -318,6 +321,26 @@ class UserCall:
318
321
  def customer_id(self):
319
322
  return self.__user_state.customer_id
320
323
 
324
+ @property
325
+ def voll_id(self):
326
+ return self.__user_state.voll_id
327
+
328
+ @property
329
+ def platform(self):
330
+ return self.__user_state.platform
331
+
332
+ @property
333
+ def direction_in(self):
334
+ return self.__user_state.direction_in
335
+
336
+ @property
337
+ def lst_update(self):
338
+ return self.__user_state.lst_update
339
+
340
+ @property
341
+ def protocol(self):
342
+ return self.__user_state.protocol
343
+
321
344
  @menu.setter
322
345
  def menu(self, menu):
323
346
 
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.1
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=uBnqr1KrwgehQ14_RYd82FxxWy5CBNjApyNDYWUBeKE,12331
19
+ chatgraph/types/route.py,sha256=FO5INy5UXgicuQ8FKEZKcPv6WS5YH10dPx2OaPu_0sE,2978
20
+ chatgraph-0.4.1.dist-info/entry_points.txt,sha256=bO9_Q-PqE5vCNNo6ke_-3j2gHfKQMDGnKDTkNuCdBuA,48
21
+ chatgraph-0.4.1.dist-info/LICENSE,sha256=rVJozpRzDlplOpvI8A1GvmfVS0ReYdZvMWc1j2jV0v8,1090
22
+ chatgraph-0.4.1.dist-info/METADATA,sha256=jjujZIbrgTRF86EPPGBEbtnx0tOgX1zS64WZDSh5I0Y,12866
23
+ chatgraph-0.4.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
+ chatgraph-0.4.1.dist-info/RECORD,,