diff --git a/package.json b/package.json index e1dccb0..47a4811 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "need4deed-sdk", - "version": "0.0.75", + "version": "0.0.80", "description": "Need4Deed.org SDK", "type": "commonjs", "main": "dist/index.js", diff --git a/src/types/api/accompanying.ts b/src/types/api/accompanying.ts index 5d1a5fc..4ae9dce 100644 --- a/src/types/api/accompanying.ts +++ b/src/types/api/accompanying.ts @@ -6,5 +6,5 @@ export interface ApiOpportunityAccompanyingDetails { appointmentTime?: string; refugeeNumber?: string; refugeeName?: string; - languageToTranslate?: string; + languageToTranslate?: number; } diff --git a/src/types/api/opportunity.ts b/src/types/api/opportunity.ts index d0f0968..87dcda7 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 { @@ -121,10 +131,12 @@ export interface ApiOpportunityGetList { category: OptionById; volunteerType: VolunteerStateTypeType; statusOpportunity: OpportunityStatusType; + statusMatch: OpportunityMatchStatusType; createdAt: Date; activities: OptionById[]; languages: ApiLanguage[]; availability: ApiAvailability[]; + accompanyingDetails: ApiOpportunityAccompanyingDetails; } export interface ApiOpportunityGet extends ApiOpportunityGetList { @@ -136,7 +148,6 @@ export interface ApiOpportunityGet extends ApiOpportunityGetList { comments: ApiComment[]; contact: ApiOpportunityContact; agent: ApiOpportunityAgent; - accompanyingDetails: ApiOpportunityAccompanyingDetails; } export type ApiOpportunityLean = Omit; @@ -162,14 +173,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 { diff --git a/src/types/api/volunteer.ts b/src/types/api/volunteer.ts index a9213ab..cf54b12 100644 --- a/src/types/api/volunteer.ts +++ b/src/types/api/volunteer.ts @@ -1,11 +1,7 @@ import { DocumentStatusType, Id } from "../core"; import { OptionById, OptionId } from "./common"; import { ApiLanguage } from "./language"; -import { - ApiOpportunityGetList, - OpportunityVolunteerStatusType, - OpportunityVolunteer, -} from "./opportunity"; +import { ApiOpportunityGetList, OpportunityVolunteer } from "./opportunity"; import { OptionItem } from "./option"; import { ApiPersonGet, PreferredCommunicationType } from "./person"; import { ProfileVolunteeringType } from "./profile"; @@ -115,6 +111,7 @@ export enum VolunteerStateMatchType { PENDING_MATCH = "vol-pending-match", MATCHED = "vol-matched", NEEDS_REMATCH = "vol-needs-rematch", + PAST = "vol-past", } export const VolunteerCommunicationType = PreferredCommunicationType;