in src/dfcx_scrapi/builders/pages.py [0:0]
def calc_transition_route_stats(self):
"""Calculating TransitionRoute related stats."""
self.transition_routes_count = len(
self.page_proto_obj.transition_routes
)
for tr in self.page_proto_obj.transition_routes:
if tr.trigger_fulfillment:
self.routes_with_fulfill_count += 1
fb = FulfillmentBuilder(tr.trigger_fulfillment)
if fb.has_webhook():
self.routes_with_webhook_fulfill_count += 1
if tr.intent and tr.condition:
self.intent_and_cond_routes_count += 1
elif tr.intent and not tr.condition:
self.intent_routes_count += 1
elif not tr.intent and tr.condition:
self.cond_routes_count += 1