import {z} from 'zod' export type AdaptekApiApplicationPrizmPrizmContactDto = {id?: number | undefined, firstName?: (string | null) | undefined, middleName?: (string | null) | undefined, lastName?: (string | null) | undefined, greeting?: (string | null) | undefined, gender?: (string | null) | undefined, emailAddress?: (string | null) | undefined, driversLicenseNumber?: (string | null) | undefined, vaId?: (string | null) | undefined, driversLicenseExpirationDate?: string | undefined, driversLicenseIssueDate?: string | undefined, driversLicenseState?: (string | null) | undefined, maritalStatus?: (string | null) | undefined, image?: (string | null) | undefined}; export type AdaptekApiApplicationLeadsQueriesGetLeadsColorOfMoneyQAndAModel = {question?: (string | null) | undefined, answer?: (string | null) | undefined}; export type AdaptekApiApplicationLeadsQueriesGetLeadsPersonSeminarDto = {id?: number | undefined, personId?: number | undefined, seminarDateTime?: string | undefined, isGuestAttending?: boolean | undefined, location?: (string | null) | undefined, guestName?: (string | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesApiKey = {id?: string | undefined, fmoId?: (number | null) | undefined, holdingCompanyId?: (number | null) | undefined, fmo?: AdaptekApiDomainPersonContextEntitiesFMO | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined}; export type AdaptekApiDomainPersonContextEntitiesFMO = {id?: number | undefined, name?: (string | null) | undefined, isActive?: boolean | undefined, holdingCompanies?: (Array | null) | undefined, apiKey?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesEmailAddressTypeEntity = {id?: number | undefined, name?: (string | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonEmailAddress = {id?: number | undefined, externalIdentifier?: (string | null) | undefined, personId?: number | undefined, emailAddressTypeId?: number | undefined, emailAddress?: (string | null) | undefined, isUnsubscribedFromCampaigns?: boolean | undefined, isUndeliverable?: boolean | undefined, undeliverableReason?: (string | null) | undefined, isPreferred?: boolean | undefined, remarks?: (string | null) | undefined, isDeleted?: boolean | undefined, dateModified?: string | undefined, importNumber?: number | undefined, isValidated?: boolean | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, emailAddressTypeEntity?: AdaptekApiDomainPersonContextEntitiesEmailAddressTypeEntity | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonElectronicContact = {id?: number | undefined, personID?: number | undefined, externalIdentifier?: (string | null) | undefined, electronicContactTypeID?: number | undefined, electronicContact?: (string | null) | undefined, isPreferred?: boolean | undefined, remarks?: (string | null) | undefined, isDeleted?: boolean | undefined, importNumber?: number | undefined, dateModified?: string | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonDisciplineAdvisor = {id?: number | undefined, personDisciplineId?: number | undefined, advisorId?: number | undefined, discipline?: AdaptekApiDomainPersonContextEntitiesPersonDiscipline | undefined, advisor?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonDiscipline = {id?: number | undefined, personId?: number | undefined, holdingCompanyId?: number | undefined, discipline?: (string | null) | undefined, status?: (string | null) | undefined, service?: (string | null) | undefined, level?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, disciplineAdvisors?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonMergeStatus = {id?: number | undefined, mergeToPersonId?: number | undefined, mergeFromPersonId?: number | undefined, queuedDate?: string | undefined, completedDate?: (string | null) | undefined, failedDate?: (string | null) | undefined, mergeJson?: (string | null) | undefined, toPerson?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, fromPerson?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonNote = {id?: number | undefined, holdingCompanyId?: number | undefined, consumerId?: number | undefined, note?: (string | null) | undefined, dateCreated?: string | undefined, employeeCreatedId?: number | undefined, externalIdentifier?: (string | null) | undefined, importNumber?: number | undefined, disciplineTypeId?: (number | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, employeeCreated?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined}; export type AdaptekApiDomainPersonContextEntitiesPhoneNumberType = {id?: number | undefined, name?: (string | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonPhoneNumber = {id?: number | undefined, isDeleted?: boolean | undefined, phoneNumber?: number | undefined, phoneNumberTypeId?: number | undefined, personId?: number | undefined, isPreferred?: boolean | undefined, externalIdentifier?: (string | null) | undefined, phoneNumberType?: AdaptekApiDomainPersonContextEntitiesPhoneNumberType | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiCommonConstantsPeopleSocialSecurityBenefitType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; export type AdaptekApiDomainPersonContextEntitiesPersonSocialSecurity = {personId?: number | undefined, overrideLifeExpectancy?: boolean | undefined, expectedAgeAtDeath?: (number | null) | undefined, primaryInsuranceAmount?: number | undefined, currentBenefitAmount?: (number | null) | undefined, benefitFirstReceivedDate?: (string | null) | undefined, isAlreadyReceivingBenefits?: boolean | undefined, ssdiBenefitAmount?: (number | null) | undefined, hasSsdi?: boolean | undefined, currentAnnualIncome?: number | undefined, socialSecurityBenefitTypeID?: AdaptekApiCommonConstantsPeopleSocialSecurityBenefitType | undefined, anticipatedBenefitAge?: number | undefined, colaAssumption?: number | undefined, includeMedicareEstimates?: boolean | undefined, exsDateOfBirth?: (string | null) | undefined, exsPrimaryInsuranceAmount?: number | undefined, deceasedDateOfBirth?: (string | null) | undefined, deceasedPrimaryInsuranceAmount?: number | undefined, spousalSurvivorBenefitAmount?: number | undefined, hasBeenDivorced?: boolean | undefined, hasBeenWidowed?: boolean | undefined, hasWorkedAsGovernmentEmployee?: boolean | undefined, deceasedBenefitAmount?: (number | null) | undefined, deceasedBenefitFirstReceivedDate?: (string | null) | undefined, deceasedDateOfDeath?: (string | null) | undefined, deceasedReceivingAtDeath?: boolean | undefined, receivingPensionWithoutSocialSecurity?: boolean | undefined, currentMarriageStartedAfterSixty?: boolean | undefined, caseCentralModifiedAgentId?: (number | null) | undefined, caseCentralDateModified?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonRetirement = {personId?: number | undefined, desiredRetirementAge?: number | undefined, desiredRetirementAnnualIncome?: number | undefined, descriptionOfGoals?: (string | null) | undefined, isRetired?: boolean | undefined, actualRetirementAge?: number | undefined, intendToWorkInRetirement?: boolean | undefined, retirementWorkingIncome?: number | undefined, desiredRetirementInflation?: number | undefined, caseCentralModifiedAgentId?: (number | null) | undefined, caseCentralDateModified?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonLeadApiKeyRetrieval = {id?: number | undefined, apiKeyId?: string | undefined, personLeadId?: number | undefined, dateRetrieved?: string | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonLead = {personId?: number | undefined, ipAddress?: (string | null) | undefined, referrer?: (string | null) | undefined, browser?: (string | null) | undefined, userId?: number | undefined, dateReceived?: string | undefined, isProcessed?: boolean | undefined, mergeToPersonId?: (number | null) | undefined, referrerDomainAndPath?: (string | null) | undefined, spouseId?: (number | null) | undefined, dateRetrieved?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, spouse?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, advisor?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined, retrievedLeads?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPhysicalAddressType = {id?: number | undefined, name?: (string | null) | undefined}; export type AdaptekApiCommonConstantsCommonStateOrProvinceType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56; export type AdaptekApiDomainPersonContextEntitiesPhysicalAddress = {id?: number | undefined, street?: (string | null) | undefined, street2?: (string | null) | undefined, city?: (string | null) | undefined, zipCode?: number | undefined, stateOrProvinceId?: AdaptekApiCommonConstantsCommonStateOrProvinceType | undefined, personPhysicalAddress?: AdaptekApiDomainPersonContextEntitiesPersonPhysicalAddress | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonPhysicalAddress = {id?: number | undefined, personId?: number | undefined, isPreferred?: boolean | undefined, isDeleted?: boolean | undefined, physicalAddressId?: number | undefined, physicalAddressTypeId?: number | undefined, externalIdentifier?: (string | null) | undefined, physicalAddressType?: AdaptekApiDomainPersonContextEntitiesPhysicalAddressType | undefined, physicalAddress?: AdaptekApiDomainPersonContextEntitiesPhysicalAddress | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonVaultUserLogon = {id?: number | undefined, personVaultUserId?: number | undefined, logonDateTime?: string | undefined, personVaultUser?: AdaptekApiDomainPersonContextEntitiesPersonVaultUser | undefined}; export type AdaptekApiCommonConstantsVaultUserVault2FAAuthType = 1 | 2; export type AdaptekApiDomainPersonContextEntitiesPersonVaultUser2FA = {id?: number | undefined, personVaultUserId?: number | undefined, contactValue?: (string | null) | undefined, vault2FAAuthTypeId?: AdaptekApiCommonConstantsVaultUserVault2FAAuthType | undefined, dateVerified?: string | undefined, personVaultUser?: AdaptekApiDomainPersonContextEntitiesPersonVaultUser | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonVaultUser = {personId?: number | undefined, username?: (string | null) | undefined, dateConfirmed?: (string | null) | undefined, isAccountSetup?: boolean | undefined, isDeleted?: boolean | undefined, has2FA?: boolean | undefined, is2FADismissed?: boolean | undefined, dateCreated?: string | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, personVaultUserLogins?: (Array | null) | undefined, personVaultUser2FA?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonColorOfMoneyScoreAnswer = {id?: number | undefined, colorOfMoneyQuestionOptionId?: number | undefined, personColorOfMoneyScoreId?: number | undefined, personColorOfMoneyScore?: AdaptekApiDomainPersonContextEntitiesPersonColorOfMoneyScore | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonColorOfMoneyScore = {id?: number | undefined, personId?: number | undefined, colorOfMoneyVersionId?: number | undefined, score?: number | undefined, dateCompleted?: string | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, spouse?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, spouseId?: (number | null) | undefined, personColorOfMoneyScoreAnswer?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonStrategyAssessment = {id?: number | undefined, personId?: number | undefined, dateStarted?: string | undefined, dateCompleted?: (string | null) | undefined, hasCompletedComra?: boolean | undefined, hasCompletedHousehold?: boolean | undefined, hasCompletedIncome?: boolean | undefined, hasCompletedCompass?: boolean | undefined, strategyAssessmentSectionId?: number | undefined, strategyAssessmentTypeId?: number | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonRelationship = {person1Id?: number | undefined, person2Id?: number | undefined, relationshipTypeId?: number | undefined, externalIdentifier?: (string | null) | undefined, remarks?: (string | null) | undefined, isDeleted?: boolean | undefined, importNumber?: number | undefined, person1?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, person2?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, marriageDetail?: AdaptekApiDomainPersonContextEntitiesPersonRelationshipMarriageDetail | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonRelationshipMarriageDetail = {person1Id?: number | undefined, person2Id?: number | undefined, relationshipTypeId?: number | undefined, startDate?: (string | null) | undefined, endDate?: (string | null) | undefined, personRelationshipMarriageEndTypeId?: (number | null) | undefined, person1?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, person2?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, personRelationship?: AdaptekApiDomainPersonContextEntitiesPersonRelationship | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonActOn = {personId?: number | undefined, actOnContactId?: (string | null) | undefined, firstName?: (string | null) | undefined, lastName?: (string | null) | undefined, preferredName?: (string | null) | undefined, email?: (string | null) | undefined, emailType?: (string | null) | undefined, phone?: (string | null) | undefined, phoneType?: (string | null) | undefined, zipCode?: (string | null) | undefined, spouseFirstName?: (string | null) | undefined, spouseLastName?: (string | null) | undefined, spousePreferred?: (string | null) | undefined, spouseEmail?: (string | null) | undefined, spouseEmailType?: (string | null) | undefined, spousePhone?: (string | null) | undefined, spousePhoneType?: (string | null) | undefined, spouseZip?: (string | null) | undefined, loggedIntoVault?: boolean | undefined, verifiedEmailAddress?: boolean | undefined, finishedVaultSetup?: boolean | undefined, comraCompleted?: boolean | undefined, hasCompletedComra?: boolean | undefined, hasCompletedIncome?: boolean | undefined, hasCompletedCompass?: boolean | undefined, saCompleted?: boolean | undefined, vaultLeadUrl?: (string | null) | undefined, lastUpdated?: string | undefined, lastSynced?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonTalkdesk = {personId?: number | undefined, name?: (string | null) | undefined, email?: (string | null) | undefined, phone?: (string | null) | undefined, zipCode?: (string | null) | undefined, lastUpdated?: string | undefined, lastSynced?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonInformationRequest = {personId?: number | undefined, agentId?: (number | null) | undefined, dateUpdated?: string | undefined, ssmax?: (boolean | null) | undefined, custodialCare?: (boolean | null) | undefined, retirementCompass?: (boolean | null) | undefined, foundMoney?: (boolean | null) | undefined, financialOverview?: (boolean | null) | undefined, userUpdated?: (number | null) | undefined, personUpdated?: (number | null) | undefined, dateCreated?: string | undefined, dateReferralAgentAdded?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesInquiryType = {id?: number | undefined, name?: (string | null) | undefined, personInquiryTypes?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonInquiryTypeHistory = {id?: number | undefined, personInquiryTypeId?: number | undefined, agencyId?: (number | null) | undefined, dateReceived?: string | undefined, personCreatedId?: (number | null) | undefined, employeeCreatedId?: (number | null) | undefined, personCreated?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, personInquiryType?: AdaptekApiDomainPersonContextEntitiesPersonInquiryType | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonInquiryType = {id?: number | undefined, personId?: number | undefined, inquiryTypeId?: number | undefined, isHidden?: boolean | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined, inquiryType?: AdaptekApiDomainPersonContextEntitiesInquiryType | undefined, personInquiryTypeHistory?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonSeminar = {id?: number | undefined, personId?: number | undefined, seminarDateTime?: string | undefined, isGuestAttending?: boolean | undefined, location?: (string | null) | undefined, guestName?: (string | null) | undefined, person?: AdaptekApiDomainPersonContextEntitiesPerson | undefined}; export type AdaptekApiDomainPersonContextEntitiesPerson = {id?: number | undefined, importNumber?: number | undefined, externalIdentifier?: (string | null) | undefined, holdingCompanyId?: number | undefined, confirmationNeededTypeId?: (number | null) | undefined, personTitleTypeId?: (number | null) | undefined, firstName?: (string | null) | undefined, middleName?: (string | null) | undefined, lastName?: (string | null) | undefined, personSuffixTypeId?: (number | null) | undefined, personStatusTypeId?: number | undefined, personSourceTypeId?: (number | null) | undefined, genderTypeId?: number | undefined, dateOfBirth?: (string | null) | undefined, ssn?: (string | null) | undefined, greeting?: (string | null) | undefined, entity?: (string | null) | undefined, driversLicenseNumber?: (string | null) | undefined, driversLicenseStateOrProvinceId?: (number | null) | undefined, driversLicenseExpirationDate?: (string | null) | undefined, driversLicenseIssueDate?: (string | null) | undefined, isCitizen?: boolean | undefined, remarks?: (string | null) | undefined, isDeleted?: boolean | undefined, riskTolerance?: (number | null) | undefined, profilePicturePath?: (string | null) | undefined, age?: (number | null) | undefined, maritalStatusTypeId?: number | undefined, dateCreated?: string | undefined, deceasedDate?: (string | null) | undefined, lifeExpectancy?: (number | null) | undefined, textOptionsViewed?: boolean | undefined, overallCoding?: (string | null) | undefined, overallService?: (string | null) | undefined, overallLevel?: (string | null) | undefined, createdByUserId?: (number | null) | undefined, createdByPersonId?: (number | null) | undefined, overallCodingChangedBy?: (number | null) | undefined, overallCodingDateChanged?: (string | null) | undefined, salesforcePersonId?: (string | null) | undefined, salesforceContactId?: (string | null) | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined, emailAddresses?: (Array | null) | undefined, electronicContacts?: (Array | null) | undefined, disciplines?: (Array | null) | undefined, personMergeStatusTo?: (Array | null) | undefined, personMergeStatusFrom?: (Array | null) | undefined, personNotes?: (Array | null) | undefined, phoneNumbers?: (Array | null) | undefined, personSocialSecurity?: AdaptekApiDomainPersonContextEntitiesPersonSocialSecurity | undefined, personRetirement?: AdaptekApiDomainPersonContextEntitiesPersonRetirement | undefined, personLead?: AdaptekApiDomainPersonContextEntitiesPersonLead | undefined, spouseLead?: AdaptekApiDomainPersonContextEntitiesPersonLead | undefined, addresses?: (Array | null) | undefined, vaultUser?: AdaptekApiDomainPersonContextEntitiesPersonVaultUser | undefined, colorOfMoneyScores?: (Array | null) | undefined, spouseColorOfMoneyScores?: (Array | null) | undefined, strategyAssessments?: (Array | null) | undefined, myMarriageDetails?: (Array | null) | undefined, myRelationships?: (Array | null) | undefined, actOnTwo?: AdaptekApiDomainPersonContextEntitiesPersonActOn | undefined, talkdesk?: AdaptekApiDomainPersonContextEntitiesPersonTalkdesk | undefined, personInformationRequest?: AdaptekApiDomainPersonContextEntitiesPersonInformationRequest | undefined, personInquiryTypes?: (Array | null) | undefined, personInquiryTypeHistories?: (Array | null) | undefined, seminarResponses?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesPersonSourceType = {id?: number | undefined, importNumber?: number | undefined, externalIdentifier?: (string | null) | undefined, holdingCompanyId?: (number | null) | undefined, name?: (string | null) | undefined, isGlobal?: boolean | undefined, isDeleted?: boolean | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined, person?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesCompany = {id?: number | undefined, companyName?: (string | null) | undefined, holdingCompanyId?: number | undefined, companyType?: (string | null) | undefined, externalId?: (string | null) | undefined, importNum?: (number | null) | undefined, byAllAccountsId?: (number | null) | undefined, deleted?: (boolean | null) | undefined, isApproved?: (boolean | null) | undefined, isGlobal?: (boolean | null) | undefined, remarks?: (string | null) | undefined, isIns?: boolean | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined}; export type AdaptekApiDomainPersonContextEntitiesHoldingCompany = {id?: number | undefined, name?: (string | null) | undefined, holdingCompanyId?: (number | null) | undefined, bd?: (boolean | null) | undefined, ria?: (boolean | null) | undefined, ins?: (boolean | null) | undefined, tax?: (boolean | null) | undefined, trst?: (boolean | null) | undefined, mrtg?: (boolean | null) | undefined, agency?: (boolean | null) | undefined, isActive?: boolean | undefined, fmoId?: number | undefined, fmo?: AdaptekApiDomainPersonContextEntitiesFMO | undefined, people?: (Array | null) | undefined, advisors?: (Array | null) | undefined, personNotes?: (Array | null) | undefined, apiKey?: (Array | null) | undefined, personSourceType?: (Array | null) | undefined, companies?: (Array | null) | undefined}; export type AdaptekApiDomainPersonContextEntitiesAgencyRole = {id?: number | undefined, holdingCompanyId?: number | undefined, agentId?: number | undefined, advisorId?: (number | null) | undefined, role?: (string | null) | undefined, agent?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined, advisor?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined}; export type AdaptekApiDomainPersonContextEntitiesAdvisor = {id?: number | undefined, active?: (boolean | null) | undefined, externalId?: (string | null) | undefined, holdingCompanyId?: number | undefined, firstName?: (string | null) | undefined, lastName?: (string | null) | undefined, isActive?: boolean | undefined, holdingCompany?: AdaptekApiDomainPersonContextEntitiesHoldingCompany | undefined, disciplineAdvisors?: (Array | null) | undefined, agentRoles?: (Array | null) | undefined, advisorRoles?: (Array | null) | undefined, personNotes?: (Array | null) | undefined, personLeads?: (Array | null) | undefined}; export type AdaptekApiApplicationLeadsPersonLeadDto = {agencyId?: number | undefined, agencyName?: (string | null) | undefined, agentId?: number | undefined, agentName?: (string | null) | undefined, externalAgentId?: (string | null) | undefined, leadId?: (string | null) | undefined, firstName?: (string | null) | undefined, fmoId?: (string | null) | undefined, preferredName?: (string | null) | undefined, lastName?: (string | null) | undefined, email?: (string | null) | undefined, emailType?: (string | null) | undefined, phone?: (string | null) | undefined, phoneType?: (string | null) | undefined, zipCode?: (string | null) | undefined, referrer?: (string | null) | undefined, inquiryType?: (string | null) | undefined, browser?: (string | null) | undefined, dateReceived?: string | undefined, dateRetrieved?: string | undefined, ipAddress?: (string | null) | undefined, comraInfo?: (Array | null) | undefined, seminarResponse?: AdaptekApiApplicationLeadsQueriesGetLeadsPersonSeminarDto | undefined, advisor?: AdaptekApiDomainPersonContextEntitiesAdvisor | undefined, comraScore?: (number | null) | undefined, isProcessed?: boolean | undefined}; export type AdaptekApiApplicationPrizmSendLeadRequest = {contact?: AdaptekApiApplicationPrizmPrizmContactDto | undefined, lead?: AdaptekApiApplicationLeadsPersonLeadDto | undefined}; export type CreateApiV1LeadsSendToPrizmPortalIdArgs = {portalId: number, body: AdaptekApiApplicationPrizmSendLeadRequest}; export type CreateApiV1LeadsSendToPrizmPortalIdOptions = {baseUrl: string, oauth2?: string | undefined, fetch?: typeof fetch | undefined}; export const createApiV1LeadsSendToPrizmPortalIdResponse = z.boolean(); 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 }; /** * POST /v1/Leads/SendToPrizm/{portalId} */ export const createApiV1LeadsSendToPrizmPortalId = async (args: CreateApiV1LeadsSendToPrizmPortalIdArgs, options: CreateApiV1LeadsSendToPrizmPortalIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, oauth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (oauth2 !== undefined) headers.set('authorization', `Bearer ${oauth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/Leads/SendToPrizm/${encodeURIComponent(String(args.portalId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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(createApiV1LeadsSendToPrizmPortalIdResponse, await res.json()) };