Skip to content

Commit

Permalink
Feature: Adding Company Response Data
Browse files Browse the repository at this point in the history
This PR updates the Company struct to optionally include all the
available information for the `enrich` endpoint.
  • Loading branch information
joshfinnie committed Jan 10, 2024
1 parent 248f0fc commit 476057a
Showing 1 changed file with 74 additions and 5 deletions.
79 changes: 74 additions & 5 deletions src/models/company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,35 +143,104 @@ pub struct Location {
pub geo: Option<String>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct TopUsEmployeeMetros {
pub current_head_count: Option<i32>,
pub twelve_moth_growth_rate: Option<f32>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RecentExecHires {
pub joined_date: Option<String>,
pub pdl_id: Option<String>,
pub job_title: Option<String>,
pub job_title_role: Option<String>,
pub job_title_sub_role: Option<String>,
pub job_title_levels: Option<Vec<String>>,
pub previous_company_id: Option<String>,
pub previous_company_job_title: Option<String>,
pub previous_company_job_title_role: Option<String>,
pub previous_company_job_title_sub_role: Option<String>,
pub previous_company_job_title_levels: Option<Vec<String>>,
}


#[derive(Debug, Serialize, Deserialize)]
pub struct RecentExecDepartures {
pub departed_date: Option<String>,
pub pdl_id: Option<String>,
pub job_title: Option<String>,
pub job_title_role: Option<String>,
pub job_title_sub_role: Option<String>,
pub job_title_levels: Option<Vec<String>>,
pub new_company_id: Option<String>,
pub new_company_job_title: Option<String>,
pub new_company_job_title_role: Option<String>,
pub new_company_job_title_sub_role: Option<String>,
pub new_company_job_title_levels: Option<Vec<String>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct FundingDetails {
pub funding_round_date: Option<String>,
pub funding_raised: Option<f64>,
pub funding_currency: Option<String>,
pub funding_type: Option<String>,
pub investing_companies: Option<Vec<String>>,
pub investing_individuals: Option<Vec<String>>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CompanyResponse {
pub status: Option<i32>,
pub display_name: Option<String>,
pub name: Option<String>,
pub size: Option<String>,
pub employee_count: Option<i32>,
pub linkedin_employee_count: Option<i32>,
pub id: Option<String>,
pub founded: Option<i32>,
pub industry: Option<String>,
pub naics: Option<Vec<Naics>>,
pub sic: Option<Vec<Sic>>,
pub location: Option<Location>,
pub linkedin_id: Option<String>,
pub linkedin_url: Option<String>,
pub facebook_url: Option<String>,
pub twitter_url: Option<String>,
pub profiles: Option<Vec<String>>,
pub website: Option<String>,
pub ticker: Option<String>,
pub gics_sector: Option<String>,
pub mic_exchange: Option<String>,
pub type_: Option<String>,
pub summary: Option<String>,
pub tags: Option<Vec<String>>,
pub headline: Option<String>,
pub display_name_history: Option<Vec<String>>,
pub alternative_names: Option<Vec<String>>,
pub alternative_domains: Option<Vec<String>>,
pub affiliated_profiles: Option<Vec<String>>,
pub location: Option<Location>,
pub naics: Option<Vec<Naics>>,
pub sic: Option<Vec<Sic>>,
pub employee_growth_rate: Option<HashMap<String, f32>>,
pub employee_churn_rate: Option<HashMap<String, f32>>,
pub average_employee_tenure: Option<f32>,
pub average_tenure_by_role: Option<HashMap<String, f32>>,
pub average_tenure_by_level: Option<HashMap<String, f32>>,
pub employee_count_by_country: Option<HashMap<String, i32>>,
pub top_us_employee_metro: Option<Vec<TopUsEmployeeMetros>>,
pub employee_count_by_month: Option<HashMap<String, i32>>,
pub gross_additions_by_month: Option<HashMap<String, i32>>,
pub gross_departures_by_month: Option<HashMap<String, i32>>,
pub employee_count_by_month_by_role: Option<HashMap<String, HashMap<String, i32>>>,
pub employee_count_by_month_by_level: Option<HashMap<String, HashMap<String, i32>>>,
pub recent_exec_hires: Option<Vec<RecentExecHires>>,
pub recent_exec_departures: Option<Vec<RecentExecDepartures>>,
pub top_previous_employers_by_role: Option<HashMap<String, HashMap<String, i32>>>,
pub top_next_employers_by_role: Option<HashMap<String, HashMap<String, i32>>>,
pub total_funding_raised: Option<f32>,
pub latest_funding_stage: Option<String>,
pub latest_funding_date: Option<String>,
pub number_funding_rounds: Option<i32>,
pub funding_stages: Option<Vec<String>>,
pub funding_details: Option<Vec<FundingDetails>>,
pub likelihood: Option<i32>,
}

Expand Down

0 comments on commit 476057a

Please sign in to comment.