class SimpleIO: input_optional = (List('page'), List('size'), List('sort'), List('filters'), List('fields'), List('operator')) # Fields projection makes all output fields optional output_optional = ( 'id', 'id_guest', 'id_room', DateTime('reserved'), 'guests', Date('check_in'), Date('check_out'), DateTime('checked_in'), DateTime('checked_out'), DateTime('cancelled'), 'base_price', 'taxes_percentage', 'taxes_value', 'total_price', 'locator', 'pin', 'status', 'meal_plan', Dict('extras'), 'uuid', # UUID('uuid'), # 'uuid' # JSON serializaction error # https://forum.zato.io/t/returning-uuid-types-from-services-using-json/1735 'nights', 'count') skip_empty_keys = True output_repeated = True
class SimpleIO: input_required = ('locator') output_optional = ( 'id', 'id_guest', 'id_room', DateTime('reserved'), 'guests', Date('check_in'), Date('check_out'), DateTime('checked_in'), DateTime('checked_out'), DateTime('cancelled'), 'base_price', 'taxes_percentage', 'taxes_value', 'total_price', 'locator', 'pin', 'status', 'meal_plan', Dict('extras'), # 'uuid' # JSON serializaction error # https://forum.zato.io/t/returning-uuid-types-from-services-using-json/1735 'nights')
class CommonSubData: common = ('is_internal', 'topic_name', 'active_status', 'endpoint_type', 'endpoint_id', 'endpoint_name', 'delivery_method', 'delivery_data_format', 'delivery_batch_size', Bool('wrap_one_msg_in_list'), 'delivery_max_retry', Bool('delivery_err_should_block'), 'wait_sock_err', 'wait_non_sock_err', 'server_id', 'out_http_method', 'out_http_method', DateTime('creation_time'), DateTime('last_interaction_time'), 'last_interaction_type', 'last_interaction_details', Int('total_depth'), Int('current_depth_gd'), Int('current_depth_non_gd'), 'sub_key', 'has_gd', 'is_staging_enabled', 'sub_id', 'name', AsIs('ws_ext_client_id'), AsIs('ext_client_id'), 'topic_id') amqp = ('out_amqp_id', 'amqp_exchange', 'amqp_routing_key') files = ('files_directory_list', ) ftp = ('ftp_directory_list', ) pubapi = ('security_id', ) rest = ('out_rest_http_soap_id', 'rest_delivery_endpoint') service = ('service_id', ) sms_twilio = ('sms_twilio_from', 'sms_twilio_to_list') smtp = (Bool('smtp_is_html'), 'smtp_subject', 'smtp_from', 'smtp_to_list', 'smtp_body') soap = ('out_soap_http_soap_id', 'soap_delivery_endpoint') wsx = ('ws_channel_id', 'ws_channel_name', AsIs('ws_pub_client_id'), 'sql_ws_client_id', Bool('unsub_on_wsx_close'), Opaque('web_socket'))
class BaseGetSIO(BaseSIO): input_required = 'current_app', input_optional = 'target_ust', 'current_ust', 'ust' output_optional = BaseSIO.output_optional + ( DateTime('creation_time'), DateTime('expiration_time'), 'remote_addr', 'user_agent', 'is_valid', ListOfDicts('session_state_change_list'), 'result') default_value = _invalid skip_empty_keys = True
class SimpleIO(GetListAdminSIO): input_required = 'cluster_id', AsIs('pub_client_id') output_required = ('sub_id', 'sub_key', DateTime('creation_time'), 'topic_id', 'topic_name', 'sub_pattern_matched', AsIs('ext_client_id'), 'endpoint_id', 'endpoint_name') output_repeated = True
class SimpleIO(GetListAdminSIO): input_required = 'id', 'cluster_id' output_required = ('local_address', 'peer_address', 'peer_fqdn', AsIs('pub_client_id'), AsIs('ext_client_id'), DateTime('connection_time'), 'server_name', 'server_proc_pid') output_optional = 'ext_client_name', 'sub_count', 'peer_forwarded_for', 'peer_forwarded_for_fqdn' output_repeated = True
class SimpleIO: input_optional = (List('page'), List('size'), List('sort'), List('filters'), List('operator'), List('fields'), List('search')) # Fields projection makes all output fields optional output_optional = ('id', 'name', 'surname', 'gender', 'email', 'passport', Date('birthdate'), 'address1', 'address2', 'locality', 'postcode', 'province', 'country', 'home_phone', 'mobile_phone', DateTime('deleted')) skip_empty_keys = True output_repeated = True