Skip to content

Missing EntityPersonProperties missing educationHistory` field #159

@bradvogel

Description

@bradvogel

The Exa People Search API returns educationHistory on person entity properties, but the EntityPersonProperties type in exa-js doesn't include it.

API response example:

{
  "entities": [{
    "type": "person",
    "properties": {
      "name": "Brad Vogel",
      "location": "Washington, DC",
      "workHistory": [...],
      "educationHistory": [
        {
          "degree": "BS",
          "dates": { "from": "2003-01-01", "to": "2007-01-01" },
          "institution": { "name": "Virginia Tech" }
        }
      ]
    }
  }]
}

Current type in src/index.ts:

export type EntityPersonProperties = {
  name?: string | null;
  location?: string | null;
  workHistory?: EntityPersonPropertiesWorkHistoryEntry[];
};

Expected:

export type EntityPersonPropertiesEducationEntry = {
  degree?: string | null;
  dates?: EntityDateRange | null;
  institution?: { name?: string | null } | null;
};

export type EntityPersonProperties = {
  name?: string | null;
  location?: string | null;
  workHistory?: EntityPersonPropertiesWorkHistoryEntry[];
  educationHistory?: EntityPersonPropertiesEducationEntry[];
};

Also worth checking if there are other person properties the API returns that aren't typed (e.g. firstName, lastName).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions