You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceAgencyStaff{// Likely needed to update demographic informationpersonId: string;// Needed for Agency Staff List ViewfullName: string;hbxId: string;agencyRoles: AgentRole[];// Demographic Informationemail: string;dateOfBirth: string;// will be converted to date object}interfaceAgentRoleextendsAgency{/** * ### Needed to terminate the link between agent and agency * * `_id` on the agency profile * * `benefit_sponsors_broker_agency_profile_id` on a broker agent * * `benefit_sponsors_general_agency_profile_id` on a general agent */roleId: string;/** * This isn't strictly required for any views, but may help clear * up the understanding of roles within an Agency */agencyPosition: AgencyPosition;/** * The current state of the role with the Agency */currentState: AgencyRoleState;/** * This is required for the detail page of each individual Agency Staff */roleChangeHistory: ChangeHistory<AgencyRoleState>[];}enumAgencyPosition{Primary='Primary',Staff='Staff',}enumAgencyRoleState{Pending='Pending',Active='Active',Terminated='Terminated',Other='Other',}interfaceChangeHistory<T>{changedFrom: T;changedTo: T;changedAt: string;// will be converted to Date object}/** * This is the agent that will be listed underneath the Agency Name * * The requirements doc calls this the `Writing Agent` * * Is there a more generic name? This may influence the `AgencyPosition` enum */interfacePrimaryAgent{/** * `primary_broker_role_id` on a Broker Agency profile * * `_id` on the `broker_role` object * * no analog for General Agency "primary" agent */agentId: string;fullName: string;npn: string;// what is the npn?}interfaceAgency{legalName: string;agencyType: AgencyType;primaryAgent: PrimaryAgent;}enumAgencyType{Broker='Broker',General='General',}
API Service
classAgenciesApiService{privateapi='api/v1';constructor(privatehttp: HttpClient){}/** * Retrieves all agencies (broker and general) * * Includes their "primary" agent */getAllAgencies(): Observable<Agency[]>{returnthis.http.get<Agency[]>(`${this.api}/agencies`);}/** * Retrieves all non-primary agency staff */getAllAgencyStaff(): Observable<AgencyStaff[]>{returnthis.http.get<AgencyStaff[]>(`${this.api}/agencies/agency_staff`);// .pipe(tap(console.log));}}