""" Options: Date: 2025-05-04 23:57:42 Version: 8.71 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://team.evovoice.io #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: ExportPackage.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Struct(Dict[str,Value]): pass @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Value: bool_value: Optional[bool] = None string_value: Optional[str] = None number_value: Optional[float] = None list_value: Optional[List[Struct]] = None struct_value: Optional[Struct] = None class UserDataFieldModes(str, Enum): HIDDEN = 'Hidden' READ_ONLY = 'ReadOnly' READ_WRITE = 'ReadWrite' class EndpointTypes(str, Enum): PHONE_NUMBER = 'PhoneNumber' USER = 'User' FAX_NUMBER = 'FaxNumber' EMAIL_ADDRESS = 'EmailAddress' UNUSED_1 = 'Unused_1' UNUSED_2 = 'Unused_2' UNUSED_3 = 'Unused_3' UNUSED_4 = 'Unused_4' UNUSED_5 = 'Unused_5' TEAM = 'Team' ASSISTANT = 'Assistant' class ValueTypes(str, Enum): NOT_SPECIFIED = 'NotSpecified' STRING = 'String' BOOLEAN = 'Boolean' NUMBER = 'Number' LIST = 'List' STRUCT = 'Struct' TRANSITION = 'Transition' CUSTOM = 'Custom' DATE = 'Date' AUDIO_FILE = 'AudioFile' TIME_ZONE_ID = 'TimeZoneId' PHONE_NUMBER = 'PhoneNumber' USER = 'User' ENDPOINT = 'Endpoint' TIME = 'Time' FILE = 'File' FAX_NUMBER = 'FaxNumber' EMAIL_ACCOUNT = 'EmailAccount' CUSTOMER = 'Customer' FLOW = 'Flow' TEAM = 'Team' FLOW_REFERENCE = 'FlowReference' INTEGRATION = 'Integration' ASSISTANT = 'Assistant' class UIHints(str, Enum): NONE = 'None' LARGE_TEXT = 'LargeText' INLINE_FORM = 'InlineForm' PASSWORD = 'Password' INLINE_STRUCT = 'InlineStruct' class DataFieldUniqueness(str, Enum): NOT_UNIQUE = 'NotUnique' UNIQUE = 'Unique' UNIQUE_TO_CUSTOMER = 'UniqueToCustomer' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class DataField: id: Optional[str] = None name: Optional[str] = None type: Optional[ValueTypes] = None ui_hint: Optional[UIHints] = None ui_tab: Optional[str] = None is_async: bool = False disable_binding: bool = False struct_type: Optional[DataType] = None list_type: Optional[DataType] = None description: Optional[str] = None possible_values: Optional[List[str]] = None is_output: bool = False custom_field_values_url: Optional[str] = None default_value: Optional[Value] = None transition_name_format: Optional[str] = None uniqueness: Optional[DataFieldUniqueness] = None voice_only: bool = False conditional_visibility_field: Optional[str] = None conditional_visibility_value: Optional[str] = None no_eval_template: bool = False user_mode: Optional[UserDataFieldModes] = None any_value_type: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class DataType: type_name: Optional[str] = None fields: Optional[List[DataField]] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class SystemSettingsField(DataField): value: Optional[Value] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class CustomerDataField(DataField): show_in_search: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class EndpointDataField(DataField): show_in_search: bool = False show_in_lists: bool = False endpoint_type: Optional[EndpointTypes] = None is_caller_id: bool = False is_knob: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class FlowInfo(EntityInfo): # @ApiMember(Description="The name of this flow") name: Optional[str] = None """ The name of this flow """ # @ApiMember(Description="The roles that this flow has") roles: Optional[List[FlowRoles]] = None """ The roles that this flow has """ # @ApiMember(Description="What this flow does") description: Optional[str] = None """ What this flow does """ # @ApiMember(Description="Any notes for this flow") notes: Optional[str] = None """ Any notes for this flow """ # @ApiMember(Description="The ID of the account associated with the flow") account_id: Optional[str] = None """ The ID of the account associated with the flow """ # @ApiMember(Description="The name of the account associated with the flow") account_name: Optional[str] = None """ The name of the account associated with the flow """ # @ApiMember(Description="The ID of the customer this flow is associated with") customer_id: Optional[str] = None """ The ID of the customer this flow is associated with """ # @ApiMember(Description="The name of the customer this flow is associated with") customer_name: Optional[str] = None """ The name of the customer this flow is associated with """ # @ApiMember(Description="The breadcrumb to the flow for this endpoint") customer_breadcrumb: Optional[List[CustomerBreadcrumb]] = None """ The breadcrumb to the flow for this endpoint """ # @ApiMember(Description="The nodes in this flow") nodes: Optional[List[FlowNode]] = None """ The nodes in this flow """ # @ApiMember(Description="The flow's parameters") parameters: Optional[List[FlowParameter]] = None """ The flow's parameters """ # @ApiMember(Description="The flow's exits") exits: Optional[List[FlowExit]] = None """ The flow's exits """ # @ApiMember(Description="The UI data for the flow") ui: Optional[FlowUI] = None """ The UI data for the flow """ # @ApiMember(Description="The list of tags for this flow") tags: Optional[List[Tag]] = None """ The list of tags for this flow """ # @ApiMember(Description="The number of nodes in this flow") node_count: int = 0 """ The number of nodes in this flow """ @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PackageInfo: flows: Optional[List[FlowInfo]] = None customer_fields: Optional[List[CustomerDataField]] = None endpoint_fields: Optional[List[EndpointDataField]] = None system_fields: Optional[List[SystemSettingsField]] = None # @Route("/packages", "GET") # @Api(Description="Export the specified flows into a package") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ExportPackage(IReturn[PackageInfo]): """ Export the specified flows into a package """ # @ApiMember(Description="The ID of the account") account_id: Optional[str] = None """ The ID of the account """ # @ApiMember(Description="The IDs of the flows to export") flow_ids: Optional[List[str]] = None """ The IDs of the flows to export """ # @ApiMember(Description="Include all custom fields") include_all_custom_fields: bool = False """ Include all custom fields """