Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/types/api/accompanying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export interface ApiOpportunityAccompanyingDetails {
appointmentTime?: string;
refugeeNumber?: string;
refugeeName?: string;
languageToTranslate?: string;
languageToTranslate?: number;
}
30 changes: 17 additions & 13 deletions src/types/api/opportunity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -136,7 +148,6 @@ export interface ApiOpportunityGet extends ApiOpportunityGetList {
comments: ApiComment[];
contact: ApiOpportunityContact;
agent: ApiOpportunityAgent;
accompanyingDetails: ApiOpportunityAccompanyingDetails;
}

export type ApiOpportunityLean = Omit<ApiOpportunityGet, "comments">;
Expand All @@ -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 {
Expand Down
7 changes: 2 additions & 5 deletions src/types/api/volunteer.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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;
Expand Down