Skip to main content

EFSPIntegration.interview_logic

A group of methods that were code blocks in various parts of the EFSP package, but for better python tooling support, were moved here.

Any​

Callable​

Dict​

List​

Tuple​

Optional​

NamedTuple​

Iterable​

Union​

TypedDict​

datetime​

CustomDataType​

DAObject​

DAList​

log​

word​

parse_case_info​

fetch_case_info​

chain_xml​

log_error_and_notify​

ALPeopleList​

ALIndividual​

EFCaseSearch Objects​

class EFCaseSearch(DAObject)

A data-class that has holds all of the information and state for a single case search

court_id: str​

can_file_non_indexed_case: bool​

do_what_choice: str​

found_case: DAObject​

case_was_found: bool​

search_went_wrong​

def search_went_wrong() -> bool

Returns true if something errored during the case search process

get_lookup_choices​

def get_lookup_choices(
can_file_non_indexed_case: bool) -> List[Dict[str, str]]

Returns the DA choice list of what ways you are allowed to search for a case; By default, this is "party_search", and "docket_lookup", and depending on the court, it could also include "non_indexed_case".

Not passed as direct arguments, but the object attributes party_search_choice, docket_lookup_choice, and non_indexed_choice are the user-facing labels for each choice.

_visible_password_js​

ALVisiblePassword Objects​

class ALVisiblePassword(CustomDataType)

name​

input_type​

javascript​

address_fields_with_defaults​

def address_fields_with_defaults(proxy_conn, person: ALIndividual,
is_admin: bool, **kwargs)

FieldEntry​

Fields​

name_fields_with_defaults​

def name_fields_with_defaults(proxy_conn, person: ALIndividual, is_admin: bool,
can_check_efile: bool, **kwargs)

contact_fields_with_defaults​

def contact_fields_with_defaults(proxy_conn, person: ALIndividual,
is_admin: bool, can_check_efile: bool)

num_case_choices​

def num_case_choices() -> int

The number of cases that someone should have to choose between if there are too many. Mostly to limit the amount of up-front waiting someone will have to do.

search_case_by_name​

def search_case_by_name(*,
proxy_conn,
var_name: str = None,
court_id: str,
somebody,
filter_fn: Callable[[Any], bool],
roles=None) -> Tuple[bool, DAList]

Searches for cases by party name. If there are more than 10 cases found, we don't add all of the detailed information about the case, just for the first few cases

shift_case_select_window​

def shift_case_select_window(proxy_conn,
found_cases: DAList,
*,
direction: str,
start_idx: int,
end_idx: int,
roles: dict = None) -> Tuple[int, int]

Specifically used in case_search.yml, with an action to only fetch a detailed information for a few cases at a time

any_missing_party_types​

def any_missing_party_types(party_type_map: dict, users: ALPeopleList,
other_parties: ALPeopleList)

exactly_one_required_filing_component​

def exactly_one_required_filing_component(fc_opts, fc_map) -> bool

matching_tuple_option​

def matching_tuple_option(option: str, options)

fee_total​

def fee_total(fee_resp) -> Optional[float]

get_full_court_info​

def get_full_court_info(proxy_conn, court_id: str) -> Dict

Gets all of the information about the court from the id

_scale_byte_units​

def _scale_byte_units(value: Union[str, int], unit: str) -> int

Idk if these are right, but there's no examples out there. Niem suggests they might not matter: https://docs.oasis-open.org/legalxml-courtfiling/ecf/v5.0/csprd03/model/class137602.html

get_max_allowed_sizes​

def get_max_allowed_sizes(proxy_conn,
court_id: str) -> Optional[Tuple[int, int]]

Returns attachment max size, then message max size

CodeType Objects​

class CodeType(str)

ContainAny Objects​

class ContainAny(list)

SearchType​

make_filter​

def make_filter(
search: Union[Callable[..., bool], SearchType,
None]) -> Callable[..., bool]

Makes a 'filter' function from some simple type.

Necessary because docassemble doesn't store lambdas and functions well in interview dicts, so the filters need to be set as primitive types and kept that way until the search actually happens (in filter_codes).

make_filters​

def make_filters(
filters: Iterable[Union[Callable[..., bool], SearchType]]
) -> Iterable[Callable[..., bool]]

filter_codes​

def filter_codes(
options: Iterable,
filters: Iterable[Union[Callable[..., bool], SearchType]],
default: str,
exclude: Union[Callable[..., bool], SearchType, None] = None
) -> Tuple[List[Any], Optional[str]]

Given a list of filter functions from most specific to least specific, (if true, use that code), filters a total list of codes. If any codes match the exclude filter, won't use them.

check_duplicate_codes​

def check_duplicate_codes(options: List) -> bool

case_labeler​

def case_labeler(case)

get_available_efile_courts​

def get_available_efile_courts(proxy_conn) -> list

Gets the list of efilable courts, if it can