chatgraph 0.3.0__py3-none-any.whl → 0.3.4__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.
- chatgraph/__init__.py +6 -3
- chatgraph/bot/chatbot_model.py +39 -34
- chatgraph/bot/chatbot_router.py +4 -0
- chatgraph/cli/__init__.py +187 -0
- chatgraph/gRPC/gRPCCall.py +85 -0
- chatgraph/messages/message_consumer.py +7 -11
- chatgraph/pb/userstate.proto +10 -0
- chatgraph/pb/userstate_pb2.py +13 -9
- chatgraph/pb/userstate_pb2_grpc.py +44 -1
- chatgraph/pb/voll.proto +60 -3
- chatgraph/pb/voll_pb2.py +29 -9
- chatgraph/pb/voll_pb2_grpc.py +288 -1
- chatgraph/types/end_types.py +45 -0
- chatgraph/types/message_types.py +82 -186
- chatgraph/types/request_types.py +265 -0
- chatgraph/types/route.py +11 -3
- chatgraph-0.3.4.dist-info/METADATA +326 -0
- chatgraph-0.3.4.dist-info/RECORD +24 -0
- chatgraph-0.3.4.dist-info/entry_points.txt +3 -0
- chatgraph/types/output_state.py +0 -127
- chatgraph-0.3.0.dist-info/METADATA +0 -146
- chatgraph-0.3.0.dist-info/RECORD +0 -21
- {chatgraph-0.3.0.dist-info → chatgraph-0.3.4.dist-info}/LICENSE +0 -0
- {chatgraph-0.3.0.dist-info → chatgraph-0.3.4.dist-info}/WHEEL +0 -0
chatgraph/pb/voll.proto
CHANGED
|
@@ -8,6 +8,19 @@ service MessageService {
|
|
|
8
8
|
rpc SendButton(MessageRequest) returns (MessageResponse);
|
|
9
9
|
rpc SendList(MessageRequest) returns (MessageResponse);
|
|
10
10
|
rpc SendText(MessageRequest) returns (MessageResponse);
|
|
11
|
+
rpc TransferToHuman(MessageRequest) returns (MessageResponse);
|
|
12
|
+
rpc EndChat(MessageRequest) returns (MessageResponse);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
service ActionsService {
|
|
16
|
+
rpc GetCampaignID(CampaignName) returns (CampaignDetails);
|
|
17
|
+
rpc GetCampaignsList(Void) returns (CampaignsList);
|
|
18
|
+
|
|
19
|
+
rpc GetTabulationID(TabulationName) returns (TabulationDetails);
|
|
20
|
+
rpc GetTabulationsList(Void) returns (TabulationsList);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message Void {
|
|
11
24
|
}
|
|
12
25
|
|
|
13
26
|
message MessageRequest {
|
|
@@ -16,9 +29,12 @@ message MessageRequest {
|
|
|
16
29
|
string unique_customer_id = 3;
|
|
17
30
|
string message_title = 4;
|
|
18
31
|
string message_text = 5;
|
|
19
|
-
string
|
|
20
|
-
string
|
|
21
|
-
|
|
32
|
+
string platform = 6;
|
|
33
|
+
string message_caption = 7;
|
|
34
|
+
string button_title = 8;
|
|
35
|
+
string campaign_name = 9;
|
|
36
|
+
string tabulation_name = 10;
|
|
37
|
+
repeated QuickOption options = 11;
|
|
22
38
|
}
|
|
23
39
|
|
|
24
40
|
message MessageResponse {
|
|
@@ -29,4 +45,45 @@ message MessageResponse {
|
|
|
29
45
|
message QuickOption {
|
|
30
46
|
string title = 1;
|
|
31
47
|
string description = 2;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message CampaignName {
|
|
51
|
+
string campaign_name = 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message TabulationName {
|
|
55
|
+
string tabulation_name = 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message CampaignDetails{
|
|
59
|
+
string campaign_name = 1;
|
|
60
|
+
string campaign_id = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message CampaignElement{
|
|
64
|
+
string campaign_id = 1;
|
|
65
|
+
string campaign_name = 2;
|
|
66
|
+
string last_update = 3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message CampaignsList{
|
|
70
|
+
repeated CampaignElement campaigns = 1;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message TabulationDetails{
|
|
74
|
+
string tabulation_name = 1;
|
|
75
|
+
string tabulation_id = 2;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message TabulationElement{
|
|
79
|
+
string tabulation_id = 1;
|
|
80
|
+
string tabulation_name = 2;
|
|
81
|
+
string tabulation_type = 3;
|
|
82
|
+
string group_name = 4;
|
|
83
|
+
string customer_service_survey_id = 5;
|
|
84
|
+
string last_update = 6;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message TabulationsList{
|
|
88
|
+
repeated TabulationElement tabulations = 1;
|
|
32
89
|
}
|
chatgraph/pb/voll_pb2.py
CHANGED
|
@@ -24,7 +24,7 @@ _sym_db = _symbol_database.Default()
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nvoll.proto\x12\x0bmessagevoll\"\
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nvoll.proto\x12\x0bmessagevoll\"\x06\n\x04Void\"\x9d\x02\n\x0eMessageRequest\x12\x0f\n\x07hook_id\x18\x01 \x01(\t\x12\x15\n\renterprise_id\x18\x02 \x01(\t\x12\x1a\n\x12unique_customer_id\x18\x03 \x01(\t\x12\x15\n\rmessage_title\x18\x04 \x01(\t\x12\x14\n\x0cmessage_text\x18\x05 \x01(\t\x12\x10\n\x08platform\x18\x06 \x01(\t\x12\x17\n\x0fmessage_caption\x18\x07 \x01(\t\x12\x14\n\x0c\x62utton_title\x18\x08 \x01(\t\x12\x15\n\rcampaign_name\x18\t \x01(\t\x12\x17\n\x0ftabulation_name\x18\n \x01(\t\x12)\n\x07options\x18\x0b \x03(\x0b\x32\x18.messagevoll.QuickOption\"2\n\x0fMessageResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"1\n\x0bQuickOption\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\"%\n\x0c\x43\x61mpaignName\x12\x15\n\rcampaign_name\x18\x01 \x01(\t\")\n\x0eTabulationName\x12\x17\n\x0ftabulation_name\x18\x01 \x01(\t\"=\n\x0f\x43\x61mpaignDetails\x12\x15\n\rcampaign_name\x18\x01 \x01(\t\x12\x13\n\x0b\x63\x61mpaign_id\x18\x02 \x01(\t\"R\n\x0f\x43\x61mpaignElement\x12\x13\n\x0b\x63\x61mpaign_id\x18\x01 \x01(\t\x12\x15\n\rcampaign_name\x18\x02 \x01(\t\x12\x13\n\x0blast_update\x18\x03 \x01(\t\"@\n\rCampaignsList\x12/\n\tcampaigns\x18\x01 \x03(\x0b\x32\x1c.messagevoll.CampaignElement\"C\n\x11TabulationDetails\x12\x17\n\x0ftabulation_name\x18\x01 \x01(\t\x12\x15\n\rtabulation_id\x18\x02 \x01(\t\"\xa9\x01\n\x11TabulationElement\x12\x15\n\rtabulation_id\x18\x01 \x01(\t\x12\x17\n\x0ftabulation_name\x18\x02 \x01(\t\x12\x17\n\x0ftabulation_type\x18\x03 \x01(\t\x12\x12\n\ngroup_name\x18\x04 \x01(\t\x12\"\n\x1a\x63ustomer_service_survey_id\x18\x05 \x01(\t\x12\x13\n\x0blast_update\x18\x06 \x01(\t\"F\n\x0fTabulationsList\x12\x33\n\x0btabulations\x18\x01 \x03(\x0b\x32\x1e.messagevoll.TabulationElement2\xfb\x02\n\x0eMessageService\x12G\n\nSendButton\x12\x1b.messagevoll.MessageRequest\x1a\x1c.messagevoll.MessageResponse\x12\x45\n\x08SendList\x12\x1b.messagevoll.MessageRequest\x1a\x1c.messagevoll.MessageResponse\x12\x45\n\x08SendText\x12\x1b.messagevoll.MessageRequest\x1a\x1c.messagevoll.MessageResponse\x12L\n\x0fTransferToHuman\x12\x1b.messagevoll.MessageRequest\x1a\x1c.messagevoll.MessageResponse\x12\x44\n\x07\x45ndChat\x12\x1b.messagevoll.MessageRequest\x1a\x1c.messagevoll.MessageResponse2\xb4\x02\n\x0e\x41\x63tionsService\x12H\n\rGetCampaignID\x12\x19.messagevoll.CampaignName\x1a\x1c.messagevoll.CampaignDetails\x12\x41\n\x10GetCampaignsList\x12\x11.messagevoll.Void\x1a\x1a.messagevoll.CampaignsList\x12N\n\x0fGetTabulationID\x12\x1b.messagevoll.TabulationName\x1a\x1e.messagevoll.TabulationDetails\x12\x45\n\x12GetTabulationsList\x12\x11.messagevoll.Void\x1a\x1c.messagevoll.TabulationsListB\x12Z\x10./pb/messagevollb\x06proto3')
|
|
28
28
|
|
|
29
29
|
_globals = globals()
|
|
30
30
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -32,12 +32,32 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'voll_pb2', _globals)
|
|
|
32
32
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
33
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
34
34
|
_globals['DESCRIPTOR']._serialized_options = b'Z\020./pb/messagevoll'
|
|
35
|
-
_globals['
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
35
|
+
_globals['_VOID']._serialized_start=27
|
|
36
|
+
_globals['_VOID']._serialized_end=33
|
|
37
|
+
_globals['_MESSAGEREQUEST']._serialized_start=36
|
|
38
|
+
_globals['_MESSAGEREQUEST']._serialized_end=321
|
|
39
|
+
_globals['_MESSAGERESPONSE']._serialized_start=323
|
|
40
|
+
_globals['_MESSAGERESPONSE']._serialized_end=373
|
|
41
|
+
_globals['_QUICKOPTION']._serialized_start=375
|
|
42
|
+
_globals['_QUICKOPTION']._serialized_end=424
|
|
43
|
+
_globals['_CAMPAIGNNAME']._serialized_start=426
|
|
44
|
+
_globals['_CAMPAIGNNAME']._serialized_end=463
|
|
45
|
+
_globals['_TABULATIONNAME']._serialized_start=465
|
|
46
|
+
_globals['_TABULATIONNAME']._serialized_end=506
|
|
47
|
+
_globals['_CAMPAIGNDETAILS']._serialized_start=508
|
|
48
|
+
_globals['_CAMPAIGNDETAILS']._serialized_end=569
|
|
49
|
+
_globals['_CAMPAIGNELEMENT']._serialized_start=571
|
|
50
|
+
_globals['_CAMPAIGNELEMENT']._serialized_end=653
|
|
51
|
+
_globals['_CAMPAIGNSLIST']._serialized_start=655
|
|
52
|
+
_globals['_CAMPAIGNSLIST']._serialized_end=719
|
|
53
|
+
_globals['_TABULATIONDETAILS']._serialized_start=721
|
|
54
|
+
_globals['_TABULATIONDETAILS']._serialized_end=788
|
|
55
|
+
_globals['_TABULATIONELEMENT']._serialized_start=791
|
|
56
|
+
_globals['_TABULATIONELEMENT']._serialized_end=960
|
|
57
|
+
_globals['_TABULATIONSLIST']._serialized_start=962
|
|
58
|
+
_globals['_TABULATIONSLIST']._serialized_end=1032
|
|
59
|
+
_globals['_MESSAGESERVICE']._serialized_start=1035
|
|
60
|
+
_globals['_MESSAGESERVICE']._serialized_end=1414
|
|
61
|
+
_globals['_ACTIONSSERVICE']._serialized_start=1417
|
|
62
|
+
_globals['_ACTIONSSERVICE']._serialized_end=1725
|
|
43
63
|
# @@protoc_insertion_point(module_scope)
|
chatgraph/pb/voll_pb2_grpc.py
CHANGED
|
@@ -5,7 +5,7 @@ import warnings
|
|
|
5
5
|
|
|
6
6
|
import chatgraph.pb.voll_pb2 as voll__pb2
|
|
7
7
|
|
|
8
|
-
GRPC_GENERATED_VERSION = '1.
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.67.0'
|
|
9
9
|
GRPC_VERSION = grpc.__version__
|
|
10
10
|
_version_not_supported = False
|
|
11
11
|
|
|
@@ -49,6 +49,16 @@ class MessageServiceStub(object):
|
|
|
49
49
|
request_serializer=voll__pb2.MessageRequest.SerializeToString,
|
|
50
50
|
response_deserializer=voll__pb2.MessageResponse.FromString,
|
|
51
51
|
_registered_method=True)
|
|
52
|
+
self.TransferToHuman = channel.unary_unary(
|
|
53
|
+
'/messagevoll.MessageService/TransferToHuman',
|
|
54
|
+
request_serializer=voll__pb2.MessageRequest.SerializeToString,
|
|
55
|
+
response_deserializer=voll__pb2.MessageResponse.FromString,
|
|
56
|
+
_registered_method=True)
|
|
57
|
+
self.EndChat = channel.unary_unary(
|
|
58
|
+
'/messagevoll.MessageService/EndChat',
|
|
59
|
+
request_serializer=voll__pb2.MessageRequest.SerializeToString,
|
|
60
|
+
response_deserializer=voll__pb2.MessageResponse.FromString,
|
|
61
|
+
_registered_method=True)
|
|
52
62
|
|
|
53
63
|
|
|
54
64
|
class MessageServiceServicer(object):
|
|
@@ -72,6 +82,18 @@ class MessageServiceServicer(object):
|
|
|
72
82
|
context.set_details('Method not implemented!')
|
|
73
83
|
raise NotImplementedError('Method not implemented!')
|
|
74
84
|
|
|
85
|
+
def TransferToHuman(self, request, context):
|
|
86
|
+
"""Missing associated documentation comment in .proto file."""
|
|
87
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
88
|
+
context.set_details('Method not implemented!')
|
|
89
|
+
raise NotImplementedError('Method not implemented!')
|
|
90
|
+
|
|
91
|
+
def EndChat(self, request, context):
|
|
92
|
+
"""Missing associated documentation comment in .proto file."""
|
|
93
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
94
|
+
context.set_details('Method not implemented!')
|
|
95
|
+
raise NotImplementedError('Method not implemented!')
|
|
96
|
+
|
|
75
97
|
|
|
76
98
|
def add_MessageServiceServicer_to_server(servicer, server):
|
|
77
99
|
rpc_method_handlers = {
|
|
@@ -90,6 +112,16 @@ def add_MessageServiceServicer_to_server(servicer, server):
|
|
|
90
112
|
request_deserializer=voll__pb2.MessageRequest.FromString,
|
|
91
113
|
response_serializer=voll__pb2.MessageResponse.SerializeToString,
|
|
92
114
|
),
|
|
115
|
+
'TransferToHuman': grpc.unary_unary_rpc_method_handler(
|
|
116
|
+
servicer.TransferToHuman,
|
|
117
|
+
request_deserializer=voll__pb2.MessageRequest.FromString,
|
|
118
|
+
response_serializer=voll__pb2.MessageResponse.SerializeToString,
|
|
119
|
+
),
|
|
120
|
+
'EndChat': grpc.unary_unary_rpc_method_handler(
|
|
121
|
+
servicer.EndChat,
|
|
122
|
+
request_deserializer=voll__pb2.MessageRequest.FromString,
|
|
123
|
+
response_serializer=voll__pb2.MessageResponse.SerializeToString,
|
|
124
|
+
),
|
|
93
125
|
}
|
|
94
126
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
95
127
|
'messagevoll.MessageService', rpc_method_handlers)
|
|
@@ -181,3 +213,258 @@ class MessageService(object):
|
|
|
181
213
|
timeout,
|
|
182
214
|
metadata,
|
|
183
215
|
_registered_method=True)
|
|
216
|
+
|
|
217
|
+
@staticmethod
|
|
218
|
+
def TransferToHuman(request,
|
|
219
|
+
target,
|
|
220
|
+
options=(),
|
|
221
|
+
channel_credentials=None,
|
|
222
|
+
call_credentials=None,
|
|
223
|
+
insecure=False,
|
|
224
|
+
compression=None,
|
|
225
|
+
wait_for_ready=None,
|
|
226
|
+
timeout=None,
|
|
227
|
+
metadata=None):
|
|
228
|
+
return grpc.experimental.unary_unary(
|
|
229
|
+
request,
|
|
230
|
+
target,
|
|
231
|
+
'/messagevoll.MessageService/TransferToHuman',
|
|
232
|
+
voll__pb2.MessageRequest.SerializeToString,
|
|
233
|
+
voll__pb2.MessageResponse.FromString,
|
|
234
|
+
options,
|
|
235
|
+
channel_credentials,
|
|
236
|
+
insecure,
|
|
237
|
+
call_credentials,
|
|
238
|
+
compression,
|
|
239
|
+
wait_for_ready,
|
|
240
|
+
timeout,
|
|
241
|
+
metadata,
|
|
242
|
+
_registered_method=True)
|
|
243
|
+
|
|
244
|
+
@staticmethod
|
|
245
|
+
def EndChat(request,
|
|
246
|
+
target,
|
|
247
|
+
options=(),
|
|
248
|
+
channel_credentials=None,
|
|
249
|
+
call_credentials=None,
|
|
250
|
+
insecure=False,
|
|
251
|
+
compression=None,
|
|
252
|
+
wait_for_ready=None,
|
|
253
|
+
timeout=None,
|
|
254
|
+
metadata=None):
|
|
255
|
+
return grpc.experimental.unary_unary(
|
|
256
|
+
request,
|
|
257
|
+
target,
|
|
258
|
+
'/messagevoll.MessageService/EndChat',
|
|
259
|
+
voll__pb2.MessageRequest.SerializeToString,
|
|
260
|
+
voll__pb2.MessageResponse.FromString,
|
|
261
|
+
options,
|
|
262
|
+
channel_credentials,
|
|
263
|
+
insecure,
|
|
264
|
+
call_credentials,
|
|
265
|
+
compression,
|
|
266
|
+
wait_for_ready,
|
|
267
|
+
timeout,
|
|
268
|
+
metadata,
|
|
269
|
+
_registered_method=True)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class ActionsServiceStub(object):
|
|
273
|
+
"""Missing associated documentation comment in .proto file."""
|
|
274
|
+
|
|
275
|
+
def __init__(self, channel):
|
|
276
|
+
"""Constructor.
|
|
277
|
+
|
|
278
|
+
Args:
|
|
279
|
+
channel: A grpc.Channel.
|
|
280
|
+
"""
|
|
281
|
+
self.GetCampaignID = channel.unary_unary(
|
|
282
|
+
'/messagevoll.ActionsService/GetCampaignID',
|
|
283
|
+
request_serializer=voll__pb2.CampaignName.SerializeToString,
|
|
284
|
+
response_deserializer=voll__pb2.CampaignDetails.FromString,
|
|
285
|
+
_registered_method=True)
|
|
286
|
+
self.GetCampaignsList = channel.unary_unary(
|
|
287
|
+
'/messagevoll.ActionsService/GetCampaignsList',
|
|
288
|
+
request_serializer=voll__pb2.Void.SerializeToString,
|
|
289
|
+
response_deserializer=voll__pb2.CampaignsList.FromString,
|
|
290
|
+
_registered_method=True)
|
|
291
|
+
self.GetTabulationID = channel.unary_unary(
|
|
292
|
+
'/messagevoll.ActionsService/GetTabulationID',
|
|
293
|
+
request_serializer=voll__pb2.TabulationName.SerializeToString,
|
|
294
|
+
response_deserializer=voll__pb2.TabulationDetails.FromString,
|
|
295
|
+
_registered_method=True)
|
|
296
|
+
self.GetTabulationsList = channel.unary_unary(
|
|
297
|
+
'/messagevoll.ActionsService/GetTabulationsList',
|
|
298
|
+
request_serializer=voll__pb2.Void.SerializeToString,
|
|
299
|
+
response_deserializer=voll__pb2.TabulationsList.FromString,
|
|
300
|
+
_registered_method=True)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class ActionsServiceServicer(object):
|
|
304
|
+
"""Missing associated documentation comment in .proto file."""
|
|
305
|
+
|
|
306
|
+
def GetCampaignID(self, request, context):
|
|
307
|
+
"""Missing associated documentation comment in .proto file."""
|
|
308
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
309
|
+
context.set_details('Method not implemented!')
|
|
310
|
+
raise NotImplementedError('Method not implemented!')
|
|
311
|
+
|
|
312
|
+
def GetCampaignsList(self, request, context):
|
|
313
|
+
"""Missing associated documentation comment in .proto file."""
|
|
314
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
315
|
+
context.set_details('Method not implemented!')
|
|
316
|
+
raise NotImplementedError('Method not implemented!')
|
|
317
|
+
|
|
318
|
+
def GetTabulationID(self, request, context):
|
|
319
|
+
"""Missing associated documentation comment in .proto file."""
|
|
320
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
321
|
+
context.set_details('Method not implemented!')
|
|
322
|
+
raise NotImplementedError('Method not implemented!')
|
|
323
|
+
|
|
324
|
+
def GetTabulationsList(self, request, context):
|
|
325
|
+
"""Missing associated documentation comment in .proto file."""
|
|
326
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
327
|
+
context.set_details('Method not implemented!')
|
|
328
|
+
raise NotImplementedError('Method not implemented!')
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
def add_ActionsServiceServicer_to_server(servicer, server):
|
|
332
|
+
rpc_method_handlers = {
|
|
333
|
+
'GetCampaignID': grpc.unary_unary_rpc_method_handler(
|
|
334
|
+
servicer.GetCampaignID,
|
|
335
|
+
request_deserializer=voll__pb2.CampaignName.FromString,
|
|
336
|
+
response_serializer=voll__pb2.CampaignDetails.SerializeToString,
|
|
337
|
+
),
|
|
338
|
+
'GetCampaignsList': grpc.unary_unary_rpc_method_handler(
|
|
339
|
+
servicer.GetCampaignsList,
|
|
340
|
+
request_deserializer=voll__pb2.Void.FromString,
|
|
341
|
+
response_serializer=voll__pb2.CampaignsList.SerializeToString,
|
|
342
|
+
),
|
|
343
|
+
'GetTabulationID': grpc.unary_unary_rpc_method_handler(
|
|
344
|
+
servicer.GetTabulationID,
|
|
345
|
+
request_deserializer=voll__pb2.TabulationName.FromString,
|
|
346
|
+
response_serializer=voll__pb2.TabulationDetails.SerializeToString,
|
|
347
|
+
),
|
|
348
|
+
'GetTabulationsList': grpc.unary_unary_rpc_method_handler(
|
|
349
|
+
servicer.GetTabulationsList,
|
|
350
|
+
request_deserializer=voll__pb2.Void.FromString,
|
|
351
|
+
response_serializer=voll__pb2.TabulationsList.SerializeToString,
|
|
352
|
+
),
|
|
353
|
+
}
|
|
354
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
355
|
+
'messagevoll.ActionsService', rpc_method_handlers)
|
|
356
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
357
|
+
server.add_registered_method_handlers('messagevoll.ActionsService', rpc_method_handlers)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
# This class is part of an EXPERIMENTAL API.
|
|
361
|
+
class ActionsService(object):
|
|
362
|
+
"""Missing associated documentation comment in .proto file."""
|
|
363
|
+
|
|
364
|
+
@staticmethod
|
|
365
|
+
def GetCampaignID(request,
|
|
366
|
+
target,
|
|
367
|
+
options=(),
|
|
368
|
+
channel_credentials=None,
|
|
369
|
+
call_credentials=None,
|
|
370
|
+
insecure=False,
|
|
371
|
+
compression=None,
|
|
372
|
+
wait_for_ready=None,
|
|
373
|
+
timeout=None,
|
|
374
|
+
metadata=None):
|
|
375
|
+
return grpc.experimental.unary_unary(
|
|
376
|
+
request,
|
|
377
|
+
target,
|
|
378
|
+
'/messagevoll.ActionsService/GetCampaignID',
|
|
379
|
+
voll__pb2.CampaignName.SerializeToString,
|
|
380
|
+
voll__pb2.CampaignDetails.FromString,
|
|
381
|
+
options,
|
|
382
|
+
channel_credentials,
|
|
383
|
+
insecure,
|
|
384
|
+
call_credentials,
|
|
385
|
+
compression,
|
|
386
|
+
wait_for_ready,
|
|
387
|
+
timeout,
|
|
388
|
+
metadata,
|
|
389
|
+
_registered_method=True)
|
|
390
|
+
|
|
391
|
+
@staticmethod
|
|
392
|
+
def GetCampaignsList(request,
|
|
393
|
+
target,
|
|
394
|
+
options=(),
|
|
395
|
+
channel_credentials=None,
|
|
396
|
+
call_credentials=None,
|
|
397
|
+
insecure=False,
|
|
398
|
+
compression=None,
|
|
399
|
+
wait_for_ready=None,
|
|
400
|
+
timeout=None,
|
|
401
|
+
metadata=None):
|
|
402
|
+
return grpc.experimental.unary_unary(
|
|
403
|
+
request,
|
|
404
|
+
target,
|
|
405
|
+
'/messagevoll.ActionsService/GetCampaignsList',
|
|
406
|
+
voll__pb2.Void.SerializeToString,
|
|
407
|
+
voll__pb2.CampaignsList.FromString,
|
|
408
|
+
options,
|
|
409
|
+
channel_credentials,
|
|
410
|
+
insecure,
|
|
411
|
+
call_credentials,
|
|
412
|
+
compression,
|
|
413
|
+
wait_for_ready,
|
|
414
|
+
timeout,
|
|
415
|
+
metadata,
|
|
416
|
+
_registered_method=True)
|
|
417
|
+
|
|
418
|
+
@staticmethod
|
|
419
|
+
def GetTabulationID(request,
|
|
420
|
+
target,
|
|
421
|
+
options=(),
|
|
422
|
+
channel_credentials=None,
|
|
423
|
+
call_credentials=None,
|
|
424
|
+
insecure=False,
|
|
425
|
+
compression=None,
|
|
426
|
+
wait_for_ready=None,
|
|
427
|
+
timeout=None,
|
|
428
|
+
metadata=None):
|
|
429
|
+
return grpc.experimental.unary_unary(
|
|
430
|
+
request,
|
|
431
|
+
target,
|
|
432
|
+
'/messagevoll.ActionsService/GetTabulationID',
|
|
433
|
+
voll__pb2.TabulationName.SerializeToString,
|
|
434
|
+
voll__pb2.TabulationDetails.FromString,
|
|
435
|
+
options,
|
|
436
|
+
channel_credentials,
|
|
437
|
+
insecure,
|
|
438
|
+
call_credentials,
|
|
439
|
+
compression,
|
|
440
|
+
wait_for_ready,
|
|
441
|
+
timeout,
|
|
442
|
+
metadata,
|
|
443
|
+
_registered_method=True)
|
|
444
|
+
|
|
445
|
+
@staticmethod
|
|
446
|
+
def GetTabulationsList(request,
|
|
447
|
+
target,
|
|
448
|
+
options=(),
|
|
449
|
+
channel_credentials=None,
|
|
450
|
+
call_credentials=None,
|
|
451
|
+
insecure=False,
|
|
452
|
+
compression=None,
|
|
453
|
+
wait_for_ready=None,
|
|
454
|
+
timeout=None,
|
|
455
|
+
metadata=None):
|
|
456
|
+
return grpc.experimental.unary_unary(
|
|
457
|
+
request,
|
|
458
|
+
target,
|
|
459
|
+
'/messagevoll.ActionsService/GetTabulationsList',
|
|
460
|
+
voll__pb2.Void.SerializeToString,
|
|
461
|
+
voll__pb2.TabulationsList.FromString,
|
|
462
|
+
options,
|
|
463
|
+
channel_credentials,
|
|
464
|
+
insecure,
|
|
465
|
+
call_credentials,
|
|
466
|
+
compression,
|
|
467
|
+
wait_for_ready,
|
|
468
|
+
timeout,
|
|
469
|
+
metadata,
|
|
470
|
+
_registered_method=True)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
class RedirectResponse:
|
|
3
|
+
"""
|
|
4
|
+
Representa uma resposta que redireciona o fluxo do chatbot para uma nova rota.
|
|
5
|
+
|
|
6
|
+
Atributos:
|
|
7
|
+
route (str): A rota para a qual o chatbot deve redirecionar.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
def __init__(self, route: str) -> None:
|
|
11
|
+
"""
|
|
12
|
+
Inicializa a resposta de redirecionamento com a rota especificada.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
route (str): A rota para a qual o chatbot deve redirecionar.
|
|
16
|
+
"""
|
|
17
|
+
self.route = route
|
|
18
|
+
|
|
19
|
+
class EndChatResponse:
|
|
20
|
+
"""
|
|
21
|
+
Representa uma resposta que indica o fim do chatbot.
|
|
22
|
+
|
|
23
|
+
Atributos:
|
|
24
|
+
tabulation_id (str): O ID da tabulação do chatbot.
|
|
25
|
+
observations (str): As observações finais do chatbot.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, tabulation_id: str, observations:str) -> None:
|
|
29
|
+
'''
|
|
30
|
+
Finzaliza e tabula as informações do chatbot.
|
|
31
|
+
'''
|
|
32
|
+
self.tabulation_id = tabulation_id
|
|
33
|
+
self.observations = observations
|
|
34
|
+
|
|
35
|
+
class TransferToHuman:
|
|
36
|
+
"""
|
|
37
|
+
Representa uma transferencia para um atendente humano.
|
|
38
|
+
"""
|
|
39
|
+
def __init__(self, campaign_id: str, observations:str) -> None:
|
|
40
|
+
'''
|
|
41
|
+
Finzaliza e tabula as informações do chatbot.
|
|
42
|
+
'''
|
|
43
|
+
self.campaign_id = campaign_id
|
|
44
|
+
self.observations = observations
|
|
45
|
+
|