import { Address, AddressFromApi, BucketSearchResultObj, ClassificationInfo, NonprofitSDGAPI, NonprofitSDGWithTargets, OrganizationEligibleForGivingStatus, OrganizationSearchResponse, RegistrationAuthority, SearchResult, SearchResultObj, SimpleGrantsAddress } from '@yourcause/common'; import { ApplicantInfo } from './applicant.typing'; import { VettingRequestStatusId } from './application.typing'; export type OrgUnion = SearchResult|ApplicantOrganization|OrganizationSearchResponse|BucketSearchResultObj; export enum Affiliations { POLITICALLYAFFILIATED = 1, FRATERNAL = 2, VETERANS = 3, SECTARIAN = 4, SERVICE = 5, RELIGIOUS = 6, NONEOFTHEABOVE = 7 } export enum SelectedSearchType { Public = 1, Private = 2, Favorite = 3 } export interface CompanyCompliance { clientName: string; response: string; externalKey?: string; } export interface ApplicantOrganization { id: number; name: string; address: string; address2: string; country: string; state: string; city: string; postalCode: string; phoneNumber: string; charityId: number; orgIdentification: string; imageUrl: string; isPrivateOrg?: boolean; nonprofitGuid: string; clientId?: number; eligibleForGivingStatusId?: OrganizationEligibleForGivingStatus; } export interface CreateApplicantOrganization { name: string; website: string; address: string; address2: string; country: string; state: string; city: string; postalCode: string; phoneNumber: string; orgIdentification: string; applicantId: number; imageName?: string; imageUrl?: string; clientId: number; grantProgramCycleId: number; } export interface AppliedOrganization { id: number; name: string; address: string; address2: string; country: string; state: string; city: string; postalCode: string; phoneNumber: string; orgIdentification: string; isPrivateOrg: boolean; applicants: { id: number; firstName: string; lastName: string; email: string; }[]; totalApplications: number; totalPaymentValue: number; nonprofitGuid: string; vendorId: string; } export interface OrganizationForInfoPanel { id: number; guid: string; name: string; image: string; imageUrl?: string; address: SimpleGrantsAddress|Address; addressString: string; identification: string; canUpdate?: boolean; nameIsLink?: boolean; openNameInNewTab?: boolean; text?: string; document?: SearchResultObj; isPrivateOrg?: boolean; eligibleForGivingStatusId: OrganizationEligibleForGivingStatus; isInternational: boolean; parentGuid: string; parentName: string; } export interface NonprofitActivityApi { clientCharityDonationsByYear: any; networkCharityDonationsByYear: any; } export interface NonprofitDataApi { nonprofitGuid: string; classificationInfo: ClassificationInfo; nonprofitLogoImageUrl: string; subsectionCode: string; ycCharityId: number; id: number; registrationAuthorityId: number; registrationId: string; name: string; address: AddressFromApi; nonprofitIconImageUrl: string; nonprofitAffiliationId: []; createDate: string; processesOwnFunds: boolean; dueDiligence: DueDiligence; disbursementAddress: AddressFromApi; isActive: boolean; isEdVetted: boolean; } export interface YCCompliance { federalUSCompliance: boolean; nonDiscriminationCompliance: boolean; nonReligiousCompliance: boolean; } export interface DueDiligence { registrationAuthority: string; foundationType: string; ycCompliance: YCCompliance; companyCompliance?: CompanyCompliance[]; sdg: NonprofitSDGAPI[]; } export interface NonprofitAdditionalDataApi { nonprofitDetail: NonprofitDetail; nonprofit: NonprofitDataApi; } export interface NonprofitProfileData extends NonprofitAdditionalDataApi { csrStats: CsrConnectStats; gcId: string; summary: NonprofitProfileSummary; dueDiligence: DueDiligence; } export interface NonprofitProfileSummary { numberOfApplications: number; numberOfNominations: number; totalAwardAmount: number; awardsPaidAmount: number; pendingPaymentsAmount: number; latestVettingRequestStatusForOrg?: VettingRequestStatusId; } export interface NonprofitDetail { id: number; charityId?: number; registrationId: string; name: string; registrationAuthorityId: number; address: AddressFromApi; isPrivateOrg: boolean; isManualAdd?: boolean; isChapterAffiliate?: boolean; isPublished?: boolean; allowDonations: boolean; allowVolunteering: boolean; classificationInfo?: ClassificationInfo; foundationType?: string; displayName: string; displayPitch: string; displayNumber: string; displayEmail: string; displayAddress: AddressFromApi; irsAddress?: AddressFromApi; remittanceInfo?: { name: string; address: AddressFromApi; requestId: number; comments: string; }; displayUrl: string; tags: string; nonprofitIconImageUrl: string; nonprofitLogoImageUrl?: string; nonprofitHeaderImageUrl?: string; registrationAuthority?: RegistrationAuthority; isClaimed?: boolean; supportsSDGGive: boolean; supportsSDGVolunteer: boolean; sdGs: NonprofitSDGWithTargets[]; ofacCheck?: string; subsectionCode?: string; processesOwnFunds?: boolean; nonprofitStoryModel?: NonProfitStory[]; eligibleForGivingStatusId: OrganizationEligibleForGivingStatus; parentNonprofitName: string; parentNonprofitGuid: string; } export interface CompanyOrgDetail { address: string; address2: string; charityId: number; city: string; country: string; id: number; imageUrl: string; name: string; nonprofitGuid: string; orgIdentification: string; phoneNumber: string; postalCode: string; state: string; isPrivateOrg: boolean; } export interface CsrConnectStats { clientCharityDonationsByYear: DonationByYear[]; networkCharityDonationsByYear: DonationByYear[]; } export interface DonationByYear { donationYear: number; totalDonors: number; totalProcessedEmployeesDonations: number; totalCompanyMatches: number; totalVolunteerParticipants: number; totalHoursVolunteered: number; } export interface OrgForApplicant { applicationCount: number; nominationsCount: number; isPrivateOrg: boolean; id: number; name: string; address: string; address2: string; country: string; state: string; city: string; postalCode: string; phoneNumber: string; charityId: number; orgIdentification: string; applicantId: number; imageName: string; imageUrl: string; nonprofitGuid: string; clientId: number; } export interface NonprofitTopLevelStats { totalOrganizations: number; awardsTotal: number; paymentsTotal: number; numberOfApplications: number; numberOfAwards: number; numberOfPayments: number; } export interface NonprofitTop10 { organizationId: number; guid: string; name: string; requestAmount: number; awardsTotal: number; numberOfAwards: number; awardNumberAndTotal?: string; } export interface ClassificationForOrgs { classificationId: number; awardsTotal: number; numberOfAwards: number; paymentsTotal: number; numberOfPayments: number; awardNumberAndTotal?: string; paymentsNumberAndTotal?: string; name?: string; } export interface OrgForDash { applicantInfos: ApplicantInfo[]; organizationInfo: OrganizationInfo; numberOfApplications: number; amountRequested: number; numberOfAwards: number; amountAwardedTotal: number; numberOfPayments: number; paymentsTotal: number; lastApplicationDate: string; } export interface OrganizationInfo { id: number; name: string; charityId: number; phoneNumber: string; address1: string; address2: string; city: string; state: string; postalCode: string; country: string; identification: string; isPrivateOrg: boolean; imageUrl: string; guid: string; } export interface NonProfitStory { storyId: number; statusTypeId: number; imageURL: string; storyTitle: string; externalLink: string; externalLinkText: string; storyDescription: string; createdDate: string; createByUserId: number; lastModifiedDate: string; lastModifiedByUserId: number; } export enum AdHocVettingStatus { Unknown = 1, Pending = 2, Approved = 3, Rejected = 4 }