import {z} from 'zod' export type Preferences = {contactConsent?: (string | null) | undefined}; export type InternalGroupAffiliation = {endTs?: (number | null) | undefined, startTs?: (number | null) | undefined, positionType?: (string | null) | undefined, internalGroup?: (string | null) | undefined, isCurrent?: (boolean | null) | undefined, description?: (string | null) | undefined, title?: (string | null) | undefined}; export type Endorsement = {work?: (string | null) | undefined, description?: (string | null) | undefined, metadata?: (string | null) | undefined}; export type ProfileSkillEvaluation = {skillSubGroup?: (string | null) | undefined, level?: (number | null) | undefined, proficiency?: (string | null) | undefined, skillGroup?: (string | null) | undefined, skillGroupDescription?: (string | null) | undefined, source?: (string | null) | undefined, skillCategoryDescription?: (string | null) | undefined, assessmentProvider?: (string | null) | undefined, skillCategory?: (string | null) | undefined}; export type Source1 = {entityId?: (string | null) | undefined, name?: (string | null) | undefined}; export type ProfileSkill = {displayName?: (string | null) | undefined, evaluations?: (Array | null) | undefined, source?: (Source1 | null) | undefined, name?: (string | null) | undefined}; export type CareerSiteQuestionsSchema = {timestamp?: (number | null) | undefined, positionIdList?: (Array | null) | undefined, mode?: (string | null) | undefined, questions?: (Record | null) | undefined}; export type ProfileAddressSchema = {zip?: (string | null) | undefined, country?: (string | null) | undefined, city?: (string | null) | undefined, street?: (string | null) | undefined, state?: (string | null) | undefined}; export type ProfileLastContactSchema = {senderEmail?: (string | null) | undefined, senderUserId?: (string | null) | undefined, lastContactTs?: (number | null) | undefined}; export type AtsContent = {extension?: (string | null) | undefined, content?: (string | null) | undefined, isBase64?: (boolean | null) | undefined}; export type ProfileSuccessionPlanNote = {managerName?: (string | null) | undefined, status?: (string | null) | undefined, noteType?: (string | null) | undefined, managerProfileId?: (string | null) | undefined, noteId?: (string | null) | undefined, content?: (string | null) | undefined}; export type ProfileSuccessors = {successorProfileId?: (string | null) | undefined, successorReadiness?: (string | null) | undefined}; export type ProfileSuccessionPlanMetric = {readiness?: (Record | null) | undefined}; export type ProfileSuccessionPlan = {successionPlanRole?: (string | null) | undefined, successionPlanNotes?: (Array | null) | undefined, successors?: (Array | null) | undefined, leaderWithoutPathForward?: (string | null) | undefined, successionPlanId?: (string | null) | undefined, successionPlanMetrics?: (ProfileSuccessionPlanMetric | null) | undefined}; export type ProfileRelocation = {comments?: (string | null) | undefined, travelPercentageMin?: (number | null) | undefined, relocationLocations?: (Array | null) | undefined, externalKey?: (string | null) | undefined, relocation?: (string | null) | undefined, travel?: (string | null) | undefined, travelPercentageMax?: (number | null) | undefined}; export type ProfilePromotionReadiness = {managerProfileId?: (string | null) | undefined, readiness?: (string | null) | undefined}; export type ProfileReviewer = {email?: (string | null) | undefined, profileId?: (string | null) | undefined}; export type ProfilePerformanceRating = {rating?: (number | null) | undefined, reviewedBy?: (ProfileReviewer | null) | undefined, performancePeriodEndDate?: (string | null) | undefined, ratingLabel?: (string | null) | undefined, reviewComments?: (Array | null) | undefined, reviewType?: (string | null) | undefined, performancePeriodStartDate?: (string | null) | undefined}; export type ProfilePerformanceManagement = {promotionReadiness?: (ProfilePromotionReadiness | null) | undefined, performanceRatings?: (Array | null) | undefined}; export type EmployeeInfo = {successionPlan?: (ProfileSuccessionPlan | null) | undefined, employeeId?: (string | null) | undefined, relocationPreferences?: (ProfileRelocation | null) | undefined, performanceManagement?: (ProfilePerformanceManagement | null) | undefined}; export type Award = {entity?: (string | null) | undefined, date: string, allText?: (string | null) | undefined, skills?: (Array | null) | undefined, description?: (string | null) | undefined, title: string}; export type CandidateEducation = {verificationStatus?: (string | null) | undefined, location: string | null, school: string | null, isCurrent?: (boolean | null) | undefined, isGraduated?: (boolean | null) | undefined, endTime: number | null, awards?: (Array | null) | undefined, source?: (string | null) | undefined, degree: string | null, startTime: number | null, verificationBy?: (string | null) | undefined, major: string | null, majorExternalId?: (string | null) | undefined, verificationTs?: (number | null) | undefined, degreeExternalId?: (string | null) | undefined, attachmentIds?: (Array | null) | undefined, schoolExternalId?: (string | null) | undefined, nameAlias?: (string | null) | undefined, description: string | null}; export type ProfileStagedSections = {education?: (Record | null) | undefined, awards?: (Record | null) | undefined, certificates?: (Record | null) | undefined, publications?: (Record | null) | undefined, languageProficiencies?: (Record | null) | undefined, endorsements?: (Record | null) | undefined, experiences?: (Record | null) | undefined, courses?: (Record | null) | undefined, skills?: (Record | null) | undefined, patents?: (Record | null) | undefined, projects?: (Record | null) | undefined}; export type ProfileSkillGoal = {goalType?: (string | null) | undefined, skill?: (string | null) | undefined}; export type ExperienceSchema = {industry?: (string | null) | undefined, endTime: number | null, durationMonths?: (number | null) | undefined, isInternal: boolean | null, addlJson?: (Record | null) | undefined, department?: (string | null) | undefined, work: string | null, userVerifiedSkills?: (boolean | null) | undefined, experienceKey?: (string | null) | undefined, skills?: Array | undefined, location: string | null, startTime: number | null, edited: boolean | null, isCurrent: boolean | null, description: string | null, title: string | null}; export type Tag = {creatorEmail?: (string | null) | undefined, id: string, tag?: (string | null) | undefined, tagSubtype?: (string | null) | undefined, profileId?: (string | null) | undefined, tagType?: (string | null) | undefined, url?: (string | null) | undefined, groupId?: (string | null) | undefined, positionId?: (string | null) | undefined, createdTime: number | null}; export type JTNAnswersSchema = {label?: (string | null) | undefined, questionId?: (string | null) | undefined, type?: (string | null) | undefined, values?: (string | null) | undefined}; export type SourceSchema = {sourceType?: (string | null) | undefined, datetime?: (string | null) | undefined, sourceName?: (string | null) | undefined}; export type Patent = {date: string, allText?: (string | null) | undefined, skills?: (Array | null) | undefined, description?: (string | null) | undefined, title: string}; export type ProjectFeedback = {imageUrl: string | null, rating: string | null, name: string | null, projectId: number | null, timestamp: number | null, profileId: number | null, comment: string | null}; export type Project = {addlJson?: (Record | null) | undefined, projectId: string, duration: number, links?: (Array | null) | undefined, personal_description?: (string | null) | undefined, skills: Array, time: string, feedback?: (Array | null) | undefined, company: string | null, contributors: Array | null, description?: (string | null) | undefined, title: string}; export type ApplicationQuestionAnswers = {answer?: (string | null) | undefined, questionId: string | null, displayOrder?: (string | null) | undefined, question: string | null}; export type ProfileFeedbackQuestionAnswer = {answer?: (string | null) | undefined, label?: (string | null) | undefined, questionId?: (number | null) | undefined, comment?: (string | null) | undefined}; export type ProfileFeedbackResponse = {overallFeedback?: (ProfileFeedbackQuestionAnswer | null) | undefined, feedback?: (Array | null) | undefined}; export type UserLogin = {fullName?: (string | null) | undefined, redirectEmail?: (string | null) | undefined, domain?: (string | null) | undefined, email?: (string | null) | undefined}; export type Person = {email?: (string | null) | undefined, name: string | null}; export type AtsOpeningDetail = {status?: (string | null) | undefined, closedAt?: (number | null) | undefined, openingId?: (string | null) | undefined, openedAt?: (number | null) | undefined, closeReason?: (string | null) | undefined, candidateId?: (string | null) | undefined, applicationId?: (string | null) | undefined}; export type AtsOpenings = {closedAt?: (number | null) | undefined, openingDetails?: (Array | null) | undefined, numOpenings?: (number | null) | undefined, openedAt?: (number | null) | undefined, numOpeningsFilled?: (number | null) | undefined}; export type HiringTeamMember = {role?: (string | null) | undefined, email?: (string | null) | undefined, name?: (string | null) | undefined, roleKey?: (string | null) | undefined}; export type ChangeLog = {newValue: string | null, fieldName: string | null, prevValue: string | null}; export type PositionActivities = {activityTime: number | null, activityType: string | null, changeLogs?: (Array | null) | undefined, message: string | null}; export type QuestionDependencies = {questionId: string | null, questionSource?: (string | null) | undefined, choiceValue: string | null, dependencyType?: (string | null) | undefined, childQuestionIds?: (Array | null) | undefined}; export type Questionnaire = {questionDependencies?: (Array | null) | undefined, questionnaireId: string | null}; export type JobPost = {publishedTime: number | null, expirationTime?: (number | null) | undefined, postingTitle: string | null, postingId: string | null, locale?: (string | null) | undefined, primaryPost?: (boolean | null) | undefined, jobDescription?: (string | null) | undefined, postedFor: string | null}; export type AtsUserGroups = {userGroupId?: (string | null) | undefined}; export type QuestionChoice = {label?: (string | null) | undefined, value?: (string | null) | undefined}; export type LangMapping = {locale?: (string | null) | undefined, label?: (string | null) | undefined}; export type QuestionLabel = {langMappingList?: (Array | null) | undefined, label?: (string | null) | undefined, value?: (string | null) | undefined}; export type Questions = {choices?: (Array | null) | undefined, choicesV2?: (Array | null) | undefined, questionId: string | null, help?: (string | null) | undefined, type?: (string | null) | undefined, question?: (QuestionLabel | null) | undefined, required?: (boolean | null) | undefined}; export type ATSPositionData = {createdAt: number | null, locationCountry?: (string | null) | undefined, coordinators?: (Array | null) | undefined, businessUnit?: (string | null) | undefined, isPrivate?: (boolean | null) | undefined, workLocationOption?: (string | null) | undefined, atsEntityId: string | null, hiringManager?: (Person | null) | undefined, internalPostingUrl?: (string | null) | undefined, evergreen?: (boolean | null) | undefined, skills?: (Array | null) | undefined, company: string | null, locationCity?: (string | null) | undefined, lastUpdated: number | null, displayJobId?: (string | null) | undefined, openings?: (AtsOpenings | null) | undefined, hiringTeam?: (Array | null) | undefined, followers?: (Array | null) | undefined, startDate?: (string | null) | undefined, requisitionType?: (string | null) | undefined, systemId?: (string | null) | undefined, activities?: (Array | null) | undefined, postedFor?: (string | null) | undefined, questionnaires?: (Array | null) | undefined, restrictAccess?: (boolean | null) | undefined, title: string | null, templateId?: (number | null) | undefined, recruiter: Person | null, jobPosts?: (Array | null) | undefined, hiringBand?: (string | null) | undefined, postingTitle?: (string | null) | undefined, employmentType?: (string | null) | undefined, posted: boolean | null, locationFlexibility?: (string | null) | undefined, orgUnits?: (Record | null) | undefined, companyDescription?: (string | null) | undefined, customFields?: (Record | null) | undefined, sourcers?: (Array | null) | undefined, workflowTemplateId?: (string | null) | undefined, status: string | null, jobCode?: (string | null) | undefined, open: boolean | null, postingUrl?: (string | null) | undefined, atsUserGroups?: (Array | null) | undefined, createdBy?: (string | null) | undefined, function?: (string | null) | undefined, jobStages?: (Array | null) | undefined, requiredSkills?: (Array | null) | undefined, questions?: (Array | null) | undefined, locationState?: (string | null) | undefined, locations?: (Array | null) | undefined, positionId?: (number | null) | undefined, description?: (string | null) | undefined}; export type SkillGroupList = {proficiency?: (number | null) | undefined, groupName?: (string | null) | undefined, level?: (string | null) | undefined, skillCategory?: (string | null) | undefined}; export type SkillProficiency = {proficiency?: (number | null) | undefined, skillGroupList?: (Array | null) | undefined, level?: (string | null) | undefined, name?: (string | null) | undefined}; export type CalibrationData = {flags?: (Array | null) | undefined, graduationYear?: (string | null) | undefined, workCategories?: (Array | null) | undefined, skills?: (Array | null) | undefined, diversity?: (Array | null) | undefined, idealCandidates?: (Array | null) | undefined, companies?: (Array | null) | undefined, titles?: (Array | null) | undefined, educationLevel?: (Array | null) | undefined, relocation?: (Array | null) | undefined, seniorities?: (Array | null) | undefined, maxExperience?: (number | null) | undefined, schools?: (Array | null) | undefined, skillProficiencies?: (Array | null) | undefined, idealCandidateUrls?: (Array | null) | undefined, minExperience?: (number | null) | undefined, notes?: (string | null) | undefined, locations?: (Array | null) | undefined}; export type CalibrationTemplate = {id?: (number | null) | undefined, name?: (string | null) | undefined}; export type Role = {templates?: (Array | null) | undefined, name?: (string | null) | undefined}; export type Position = {createdAt?: (number | null) | undefined, jobDescriptionUpdatedAt?: (number | null) | undefined, confidential?: (boolean | null) | undefined, hiringManager?: (Person | null) | undefined, groupId?: (string | null) | undefined, name: string | null, followers?: (Array | null) | undefined, jobDescription?: (string | null) | undefined, systemId?: (string | null) | undefined, positionDisplayId?: (string | null) | undefined, recruiter?: (Person | null) | undefined, calibrationConfirmedBy?: (string | null) | undefined, open?: (boolean | null) | undefined, createdBy?: (string | null) | undefined, calibrationConfirmedAt?: (number | null) | undefined, atsData?: (ATSPositionData | null) | undefined, calibrationData?: (CalibrationData | null) | undefined, role?: (Role | null) | undefined, positionId?: (number | null) | undefined}; export type RegisterButton = {textColor?: (string | null) | undefined, backgroundColor?: (string | null) | undefined, text?: (string | null) | undefined}; export type HomePageBanner = {useImage?: (boolean | null) | undefined, image?: (string | null) | undefined, title?: (string | null) | undefined}; export type PlannedEvent = {createdAt?: (number | null) | undefined, isCancelled?: (boolean | null) | undefined, eventSpeakers?: (Array | null) | undefined, activeRegistrations?: (string | null) | undefined, registerButton?: (RegisterButton | null) | undefined, eventTeamDataJson?: (Record | null) | undefined, eventBucket?: (string | null) | undefined, address?: (string | null) | undefined, eventCustomFieldsJson?: (Record | null) | undefined, eventType?: (string | null) | undefined, institution?: (string | null) | undefined, selectedTimezone?: (string | null) | undefined, name: string, homePageBanner?: (HomePageBanner | null) | undefined, eventLocationType?: (string | null) | undefined, id?: (string | null) | undefined, plannedEventEncId?: (string | null) | undefined, parentId?: (string | null) | undefined, venue?: (string | null) | undefined, endTimestamp: number | null, isPublished?: (boolean | null) | undefined, eventLandingPage?: (string | null) | undefined, status?: (string | null) | undefined, createdBy?: (string | null) | undefined, eventCategory?: (string | null) | undefined, startTimestamp: number | null, when?: (string | null) | undefined, description?: (string | null) | undefined}; export type ApplicationMatchScore = {topMatches?: (Array | null) | undefined, indeterminable?: (number | null) | undefined, score?: (number | null) | undefined, relevantScoreTypeVal?: (number | null) | undefined, scoreRaw?: (number | null) | undefined, scoreType?: (string | null) | undefined}; export type ProfileFeedback = {createdAt?: (string | null) | undefined, plannedEventId?: (number | null) | undefined, feedbackResponse?: (ProfileFeedbackResponse | null) | undefined, followUpEnabled?: (boolean | null) | undefined, profileId?: (number | null) | undefined, communityId?: (number | null) | undefined, sharedFeedbackMessageId?: (number | null) | undefined, viewFeedbackUrl?: (string | null) | undefined, requestedAt?: (number | null) | undefined, reminderCount?: (number | null) | undefined, requester?: (UserLogin | null) | undefined, submittedAt?: (number | null) | undefined, reviewerEmail?: (string | null) | undefined, feedbackType?: (string | null) | undefined, feedbackTemplateId?: (number | null) | undefined, feedbackEncId?: (string | null) | undefined, requesterEmail?: (string | null) | undefined, archiveFlag?: (boolean | null) | undefined, position?: (Position | null) | undefined, userCalendarEventId?: (number | null) | undefined, feedbackId?: (number | null) | undefined, feedbackTemplateName?: (string | null) | undefined, reviewer?: (UserLogin | null) | undefined, plannedEvent?: (PlannedEvent | null) | undefined, matchingData?: (Array | null) | undefined, status?: (string | null) | undefined, feedbackJson?: (Record | null) | undefined, feedbackUrl?: (string | null) | undefined, positionId?: (string | null) | undefined}; export type ProfileApplicationSchema = {stage?: (string | null) | undefined, lastModifiedTime: number | null, applicationAnswers?: (Array | null) | undefined, refereeEmail?: (string | null) | undefined, profileId?: (number | null) | undefined, utm_source?: (string | null) | undefined, feedback?: (ProfileFeedback | null) | undefined, groupId: string | null, applicationStatus: string | null, isInternal?: (boolean | null) | undefined, isReferral?: (boolean | null) | undefined, customInfo?: (Record | null) | undefined, candidateId: string | null, visaStatus?: (string | null) | undefined, comment?: (string | null) | undefined, positionTitle: string | null, id?: (string | null) | undefined, position?: (Position | null) | undefined, applicationTime: number | null, sourceName?: (string | null) | undefined, utm_campaign?: (string | null) | undefined, matchingData?: (Array | null) | undefined, currentStage?: (string | null) | undefined, sourceType?: (string | null) | undefined, isInTalentNetwork?: (boolean | null) | undefined, isCareerSite?: (boolean | null) | undefined, actionUser?: (Person | null) | undefined, atsJobId: string | null, positionId: number | null, applicationId: string}; export type CertificateSchema = {verificationStatus?: (string | null) | undefined, country?: (string | null) | undefined, skills?: (Array | null) | undefined, comments?: (string | null) | undefined, validFromDate?: (string | null) | undefined, date?: (string | null) | undefined, allText?: (Array | null) | undefined, source?: (string | null) | undefined, startDate?: (string | null) | undefined, validToDate?: (string | null) | undefined, certificateId?: (string | null) | undefined, state?: (string | null) | undefined, title: string | null, endDate?: (string | null) | undefined, verificationBy?: (string | null) | undefined, externalKey?: (string | null) | undefined, verificationTs?: (number | null) | undefined, status?: (string | null) | undefined, certificateType?: (string | null) | undefined, proficiency?: (string | null) | undefined, attachmentIds?: (Array | null) | undefined, certificateExternalId?: (string | null) | undefined, issuingAuthority?: (string | null) | undefined, description?: (string | null) | undefined}; export type Publication = {date?: (string | null) | undefined, skills?: (Array | null) | undefined, publisher?: (string | null) | undefined, description: string, title?: (string | null) | undefined}; export type Note = {creatorEmail?: (string | null) | undefined, id?: (string | null) | undefined, noteType?: (string | null) | undefined, note?: (string | null) | undefined, profileId?: (string | null) | undefined, positionId?: (string | null) | undefined, createdTime?: (number | null) | undefined}; export type ATSScheduledInterview = {organizer?: (string | null) | undefined, status?: (string | null) | undefined, endTs?: (number | null) | undefined, interviewType?: (string | null) | undefined, interviewers?: (Array | null) | undefined, startTs?: (number | null) | undefined, location?: (string | null) | undefined, comment?: (string | null) | undefined, referenceId?: (string | null) | undefined}; export type AtsTag = {tag: string | null, jobId?: (string | null) | undefined, creator?: (string | null) | undefined, tagSubtype?: (string | null) | undefined, tagType?: (string | null) | undefined, creationTs?: (number | null) | undefined}; export type AtsAttachmentApplicationMetadata = {applicationId: string}; export type AtsAttachment = {isBase64?: (boolean | null) | undefined, fileName: string, lastModifiedTs?: (number | null) | undefined, applicationMetadata?: (Array | null) | undefined, attachmentContent: string | null, attachmentId: string, attachmentType: string | null}; export type AtsEducation = {endTs?: (number | null) | undefined, verificationStatus?: (string | null) | undefined, degreeExternalId?: (string | null) | undefined, attachmentIds?: (Array | null) | undefined, startTs: number | null, degree: string | null, major: string | null, verificationBy?: (string | null) | undefined, location: string | null, isCurrent?: (boolean | null) | undefined, schoolExternalId?: (string | null) | undefined, majorExternalId?: (string | null) | undefined, verificationTs?: (number | null) | undefined, school: string | null, nameAlias?: (string | null) | undefined, isGraduated?: (boolean | null) | undefined, description: string | null}; export type LmsCourseAttendance = {durationHours?: (number | null) | undefined, percentageCompletion?: (number | null) | undefined, isInternal?: (boolean | null) | undefined, pointsEarned?: (number | null) | undefined, courseType?: (string | null) | undefined, difficulty?: (string | null) | undefined, courseUrl?: (string | null) | undefined, title?: (string | null) | undefined, completionTs?: (number | null) | undefined, lmsCourseId?: (string | null) | undefined, medium?: (string | null) | undefined, language?: (string | null) | undefined, dueTs?: (number | null) | undefined, assignedBy?: (string | null) | undefined, status?: (string | null) | undefined, startTs?: (number | null) | undefined, isMandatory?: (boolean | null) | undefined, provider?: (string | null) | undefined, verified?: (string | null) | undefined, description?: (string | null) | undefined}; export type AtsCertification = {locationCountry?: (string | null) | undefined, verificationStatus?: (string | null) | undefined, licenseNo?: (string | null) | undefined, skills?: (Array | null) | undefined, validFromTs?: (number | null) | undefined, comments?: (string | null) | undefined, allText?: (string | null) | undefined, endTs?: (number | null) | undefined, verificationBy?: (string | null) | undefined, certificateName: string | null, verificationTs?: (number | null) | undefined, status?: (string | null) | undefined, certificateType?: (string | null) | undefined, proficiency?: (string | null) | undefined, validToTs?: (number | null) | undefined, attachmentIds?: (Array | null) | undefined, startTs?: (number | null) | undefined, certificateExternalId?: (string | null) | undefined, locationState?: (string | null) | undefined, issuingAuthority?: (string | null) | undefined, description?: (string | null) | undefined}; export type Jobs = {atsJobId?: (string | null) | undefined, name?: (string | null) | undefined}; export type AtsNote = {subject?: (string | null) | undefined, to?: (string | null) | undefined, noteType?: (string | null) | undefined, visibility?: (string | null) | undefined, creator?: (string | null) | undefined, cc?: (Array | null) | undefined, body?: (string | null) | undefined, sender?: (string | null) | undefined, creationTs?: (number | null) | undefined}; export type AtsUser = {userId?: (string | null) | undefined, email?: (string | null) | undefined, name?: (string | null) | undefined, atsRoles?: (Array | null) | undefined}; export type AtsStage = {stage?: (string | null) | undefined, user: AtsUser, reason: string, wfSubStage: string, wfStage: string, stageTs: number}; export type ATSScoreCardAttribute = {rating?: (string | null) | undefined, answer?: (string | null) | undefined, note?: (string | null) | undefined, question?: (string | null) | undefined, rating_label?: (string | null) | undefined}; export type AtsScorecard = {overallRatingLabel?: (string | null) | undefined, overallRating?: (string | null) | undefined, submittedBy?: (AtsUser | null) | undefined, submittedAt?: (number | null) | undefined, interviewedAt?: (number | null) | undefined, attributes?: (Array | null) | undefined, description?: (string | null) | undefined, interviewName?: (string | null) | undefined}; export type AtsQuestionAnswer = {formName?: (string | null) | undefined, choices?: (Array | null) | undefined, explanation?: (string | null) | undefined, answer?: (Array | null) | undefined, formType?: (string | null) | undefined, questionId: string, displayOrder?: (string | null) | undefined, formId?: (string | null) | undefined, type?: (string | null) | undefined, question?: (string | null) | undefined}; export type AtsApplication = {locationCountry?: (string | null) | undefined, reason?: (string | null) | undefined, location?: (string | null) | undefined, visaStatuses?: (Array | null) | undefined, veteranStatusStr?: (string | null) | undefined, jobs?: (Array | null) | undefined, hiredTs?: (number | null) | undefined, lastModifiedTs: number | null, customInfo?: (Record | null) | undefined, note?: (AtsNote | null) | undefined, systemId?: (string | null) | undefined, creditor?: (string | null) | undefined, candidateId: string | null, rejectedTs?: (number | null) | undefined, veteranStatus?: (boolean | null) | undefined, applicationTs: number | null, pastStages?: (Array | null) | undefined, sourceName?: (string | null) | undefined, isProspect?: (boolean | null) | undefined, scorecards?: (Array | null) | undefined, jobSystemId?: (string | null) | undefined, disabilityStatus?: (boolean | null) | undefined, currentStage?: (AtsStage | null) | undefined, status?: (string | null) | undefined, races?: (Array | null) | undefined, sourceType?: (string | null) | undefined, gender?: (string | null) | undefined, questions?: (Array | null) | undefined, rejectedBy?: (string | null) | undefined, disabilityStatusStr?: (string | null) | undefined, applicationId: string}; export type AtsExperience = {endTs?: (number | null) | undefined, industry?: (string | null) | undefined, isInternal: boolean | null, department?: (string | null) | undefined, startTs: number | null, location: string | null, company: string | null, isCurrent: boolean | null, description?: (string | null) | undefined, title: string | null}; export type AtsProject = {endTs?: (number | null) | undefined, links?: (Array | null) | undefined, startTs: number | null, skills?: (Array | null) | undefined, company: string | null, contributors?: (Array | null) | undefined, description?: (string | null) | undefined, title: string | null}; export type ATSSkillGroup = {proficiency?: (string | null) | undefined, skillGroup?: (string | null) | undefined}; export type ATSSkillDetail = {skillGroups?: (Array | null) | undefined, proficiency?: (string | null) | undefined, evaluationTimestamp?: (number | null) | undefined, dataSource?: (string | null) | undefined, skill?: (string | null) | undefined}; export type ATSProfileSchema = {locationCountry?: (string | null) | undefined, contactConsent?: (string | null) | undefined, isAnonymized?: (boolean | null) | undefined, scheduledInterviews?: (Array | null) | undefined, skills?: (Array | null) | undefined, location?: (string | null) | undefined, address?: (string | null) | undefined, firstName: string, emails: string | null, detailTags?: (Array | null) | undefined, attachments?: (Array | null) | undefined, resumeContent?: (AtsContent | null) | undefined, visaStatuses?: (Array | null) | undefined, veteranStatusStr?: (string | null) | undefined, education?: (Array | null) | undefined, isInternal?: (boolean | null) | undefined, customInfo?: (Record | null) | undefined, courseAttendance?: (Array | null) | undefined, systemId?: (string | null) | undefined, urls?: (Array | null) | undefined, candidateId: string | null, title?: (string | null) | undefined, displayTags?: (Array | null) | undefined, tags?: (Array | null) | undefined, veteranStatus?: (boolean | null) | undefined, highestEducationLevel?: (string | null) | undefined, certifications?: (Array | null) | undefined, lastActivityTs: number | null, summary?: (string | null) | undefined, photoContent?: (AtsContent | null) | undefined, applications?: (Array | null) | undefined, disabilityStatus?: (boolean | null) | undefined, phones?: (string | null) | undefined, experience?: (Array | null) | undefined, races?: (Array | null) | undefined, dateOfBirth?: (string | null) | undefined, project?: (Array | null) | undefined, notes?: (Array | null) | undefined, gender?: (string | null) | undefined, questions?: (Array | null) | undefined, skillDetails?: (Array | null) | undefined, disabilityStatusStr?: (string | null) | undefined, lastName?: (string | null) | undefined}; export type InferredSkillsSchema = {skillType?: (string | null) | undefined, skills?: (Array | null) | undefined}; export type ProfileAttachmentSchema = {lastModifiedTs?: (number | null) | undefined, attachmentID?: (string | null) | undefined, attachmentType?: (string | null) | undefined, filename?: (string | null) | undefined}; export type ExternalProfileSchema = {preferences?: (Preferences | null) | undefined, jtnSubmissions?: (Record | null) | undefined, internalGroupAffiliation?: (Array | null) | undefined, atsEntityId?: (string | null) | undefined, endorsements?: (Array | null) | undefined, profileId?: number | undefined, seniorityLevel?: (string | null) | undefined, skills?: (Array | null) | undefined, location?: (string | null) | undefined, careerSiteQuestions?: (Array | null) | undefined, firstName: string, address?: (ProfileAddressSchema | null) | undefined, lastContact?: (ProfileLastContactSchema | null) | undefined, resumeContent?: (AtsContent | null) | undefined, employeeInfo?: (EmployeeInfo | null) | undefined, email?: (string | null) | undefined, lastUpdated?: number | undefined, imageUrl?: (string | null) | undefined, roleId?: (string | null) | undefined, workExperienceYears?: (number | null) | undefined, resumeFileName?: (string | null) | undefined, awards?: (Array | null) | undefined, education?: (Array | null) | undefined, efRace?: (string | null) | undefined, fullName?: (string | null) | undefined, resume?: (string | null) | undefined, profileStagedSections?: (ProfileStagedSections | null) | undefined, skillGoals?: (Array | null) | undefined, customInfo?: (Record | null) | undefined, experiences?: (Array | null) | undefined, isConfidential?: (boolean | null) | undefined, isCurrentEmployee?: (boolean | null) | undefined, urls?: (Array | null) | undefined, demandExperiences?: (Array | null) | undefined, phone?: (string | null) | undefined, title?: (string | null) | undefined, tags?: (Array | null) | undefined, id?: (string | null) | undefined, deletedAt?: (number | null) | undefined, race?: (string | null) | undefined, jtnAnswers?: (Array | null) | undefined, additionalSections?: (Record | null) | undefined, sources?: Array | undefined, currentCompany?: (string | null) | undefined, socialMediaLinks?: (Array | null) | undefined, language?: (string | null) | undefined, educationLevel: string | null, patents?: (Array | null) | undefined, efCustomInfo?: (Record | null) | undefined, dupeData?: (Record | null) | undefined, highlights?: (Array | null) | undefined, summary?: (string | null) | undefined, projects?: (Array | null) | undefined, applications?: (Array | null) | undefined, customFields?: (Record | null) | undefined, certificates?: (Array | null) | undefined, publications?: (Array | null) | undefined, notes?: (Array | null) | undefined, gender?: (string | null) | undefined, atsData?: (ATSProfileSchema | null) | undefined, industries?: (Array | null) | undefined, efGender?: (string | null) | undefined, inferredSkills?: (Array | null) | undefined, attachmentsInfo?: (Array | null) | undefined, lastName?: (string | null) | undefined}; export type UpdateApiApiV2CoreProfilesProfileIdArgs = {Authorization: string, profileId: string, refreshClaimedProfile?: string | undefined, body: ExternalProfileSchema}; export type UpdateApiApiV2CoreProfilesProfileIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; export const profileAsyncSchema = z.object({transactionId: z.string().nullable().optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Update Profile * * PUT /api/v2/core/profiles/{profileId} */ export const updateApiApiV2CoreProfilesProfileId = async (args: UpdateApiApiV2CoreProfilesProfileIdArgs, options?: UpdateApiApiV2CoreProfilesProfileIdOptions) => { const {baseUrl = "https://apiv2.eightfold.ai", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) if (args.refreshClaimedProfile != null) query.append("refreshClaimedProfile", String(args.refreshClaimedProfile)) const url = `${baseUrl.replace(/\/+$/, '')}/api/v2/core/profiles/${encodeURIComponent(String(args.profileId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(profileAsyncSchema, await res.json()) };