(row)
| 88 | |
| 89 | @staticmethod |
| 90 | def build(row): |
| 91 | authentication_dict = load_json_attr(row, "authentication", default_value={}) |
| 92 | if authentication_dict: |
| 93 | authentication = ActionAuthentication(**authentication_dict) |
| 94 | authentication.decrypt() |
| 95 | else: |
| 96 | authentication = ActionAuthentication(type=ActionAuthenticationType.none).model_dump() |
| 97 | |
| 98 | method = row["method"] |
| 99 | if not method: |
| 100 | method = ActionMethod.NONE |
| 101 | |
| 102 | body_type = row["body_type"] |
| 103 | if not body_type: |
| 104 | body_type = ActionBodyType.NONE |
| 105 | |
| 106 | return Action( |
| 107 | action_id=row["action_id"], |
| 108 | name=row["name"], |
| 109 | operation_id=row["operation_id"], |
| 110 | description=row["description"], |
| 111 | url=row["url"], |
| 112 | method=method, |
| 113 | path_param_schema=load_json_attr(row, "path_param_schema", None), |
| 114 | query_param_schema=load_json_attr(row, "query_param_schema", None), |
| 115 | body_param_schema=load_json_attr(row, "body_param_schema", None), |
| 116 | body_type=body_type, |
| 117 | function_def=load_json_attr(row, "function_def", {}), |
| 118 | openapi_schema=load_json_attr(row, "openapi_schema", {}), |
| 119 | authentication=authentication, |
| 120 | updated_timestamp=row["updated_timestamp"], |
| 121 | created_timestamp=row["created_timestamp"], |
| 122 | ) |
| 123 | |
| 124 | def to_response_dict(self) -> Dict: |
| 125 | ret = { |
nothing calls this directly
no test coverage detected