Skip to content

feat: update Entity flag field types to bool (Tango #2377) #10

Description

@infinityplusone

Companion to Tango #2377 (serializer + shaping parity for retyped Entity fields).

Tango's 0064_lakehouse_consumer_cleanup booleanizes nine Entity flag fields and drops source_type. After it ships, /api/entities/ and webhook alerts.entity.match payloads serialize those flags as JSON true / false / null instead of the legacy string tokens. tango-node should update its Entity TypeScript interface to match.

Field type changes (string → boolean)

Field Old (string tokens) New (boolean)
registered "Y" true
registration_status "Active" / "Inactive" true / false
uei_status "Active" / "Not Active" true / false
public_display_flag "Y" / "NPDY" true / false
bonding_flag "YES" / "NO" true / false
disaster_registry_flag "YES" / "NO" true / false
debt_subject_to_offset "Y" / "N" true / false
credit_card_usage "Y" / "N" true / false
edi_information_flag "Y" / "N" true / false

All nine should be typed as boolean | null — pre-0064 tokens outside the known set (or NULL) map to null. The NPDYfalse mapping for public_display_flag is the one non-obvious one; literal interpretation is "Not Publicly DisplaYed".

Other changes from the same migration

  • source_type: removed entirely from the API response. Remove it from the Entity interface. Consumers that read entity.source_type should switch to entity.source (already populated, same semantic).
  • Seven *_desc top-level fields (purpose_of_registration_desc, entity_structure_desc, entity_type_desc, profit_structure_desc, organization_structure_desc, state_of_incorporation_desc, country_of_incorporation_desc) are removed from the default entity payload. They remain accessible via ?shape=…(*) expansion, which now derives {code, description} at render time. If the SDK's Entity interface has any of those top-level keys, drop them.
  • evs_source and exclusion_status_flag are now strictly enforced enums on the server ("D&B" | "E&Y" and "Y" | "N" | "D" respectively). They still come back as strings; consider narrowing the field type to a string-literal union.

Action items

  • Update Entity interface field types in src/models/.
  • Bump fixtures / mocks if any tests assert string values on the renamed fields.
  • CHANGELOG entry on the SDK side flagging the breaking change for downstream JS/TS consumers.

~ Hal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions