From cf10dcc086b8de2c14c4c9e04fc8c1ae59277a7d Mon Sep 17 00:00:00 2001 From: nadavosa Date: Tue, 26 May 2026 16:35:56 +0200 Subject: [PATCH] feat(#488): add id to ApiOpportunityAgent Co-Authored-By: Claude Sonnet 4.6 --- src/types/api/opportunity.ts | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/types/api/opportunity.ts b/src/types/api/opportunity.ts index d0f0968..feb343a 100644 --- a/src/types/api/opportunity.ts +++ b/src/types/api/opportunity.ts @@ -27,14 +27,24 @@ export enum OpportunityStatusType { NEW = "opp-new", SEARCHING = "opp-searching", ACTIVE = "opp-active", + INACTIVE = "opp-inactive", PAST = "opp-past", } +export enum OpportunityMatchStatusType { + PENDING_MATCH = "opp-vol-pending-match", + NO_MATCHES = "opp-vol-no-matches", + MATCHED = "opp-vol-matched", + NEEDS_REMATCH = "opp-vol-needs-rematch", + UNMATCHED = "opp-vol-unmatched", + PAST = "opp-vol-past", +} + export enum OpportunityMatchStatus { - PENDING_MATCH = "opp-pending-match", - MATCHED = "opp-matched", - NEEDS_REMATCH = "opp-needs-rematch", - UNMATCHED = "opp-unmatched", + NO_MATCHES = "vol-no-matches", + PENDING_MATCH = "vol-pending-match", + MATCHED = "vol-matched", + PAST = "vol-past", } export enum OpportunityVolunteerStatusType { @@ -101,6 +111,7 @@ export interface OpportunityLegacyFormData { } export interface ApiOpportunityAgent { + id: number; type: AgentType; name: string; address: string; @@ -119,12 +130,16 @@ export interface ApiOpportunityGetList { id: Id; title: string; category: OptionById; + district: OptionById; volunteerType: VolunteerStateTypeType; statusOpportunity: OpportunityStatusType; + statusMatch: OpportunityMatchStatusType; createdAt: Date; activities: OptionById[]; languages: ApiLanguage[]; availability: ApiAvailability[]; + location: OptionById[]; + accompanyingDetails: ApiOpportunityAccompanyingDetails; } export interface ApiOpportunityGet extends ApiOpportunityGetList { @@ -132,11 +147,9 @@ export interface ApiOpportunityGet extends ApiOpportunityGetList { numberOfVolunteers: number; description: string; skills: OptionById[]; - location: OptionById[]; comments: ApiComment[]; contact: ApiOpportunityContact; agent: ApiOpportunityAgent; - accompanyingDetails: ApiOpportunityAccompanyingDetails; } export type ApiOpportunityLean = Omit; @@ -162,14 +175,7 @@ export type ApiOpportunityPatch = Partial<{ address: string; district: string; }; - accompanyingDetails: { - appointmentAddress: string; - appointmentDate: string; - appointmentTime: string; - refugeeNumber: string; - refugeeName: string; - languagesToTranslate: number; - }; + accompanyingDetails: ApiOpportunityAccompanyingDetails; }>; export interface OpportunityVolunteer {