import type { insertAddressForEntitySchema, insertAddressSchema, insertContactPointForEntitySchema, insertContactPointSchema, updateAddressSchema, updateContactPointSchema } from "@voyant-travel/identity/validation"; import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; import type { z } from "zod"; import type { communicationListQuerySchema, insertCommunicationLogSchema, insertOrganizationNoteSchema, insertOrganizationSchema, insertPersonNoteSchema, insertPersonSchema, insertSegmentSchema, organizationListQuerySchema, personListQuerySchema, updateOrganizationSchema, updatePersonSchema } from "../validation.js"; export type OrganizationListQuery = z.infer; export type CreateOrganizationInput = z.infer; export type UpdateOrganizationInput = z.infer; export type PersonListQuery = z.infer; export type CreatePersonInput = z.infer; export type UpdatePersonInput = z.infer; export type CreateContactPointInput = z.infer; export type CreateContactPointForEntityInput = z.infer; export type UpdateContactPointInput = z.infer; export type CreateAddressInput = z.infer; export type CreateAddressForEntityInput = z.infer; export type UpdateAddressInput = z.infer; export type CreatePersonNoteInput = z.infer; export type CreateOrganizationNoteInput = z.infer; export type CreateCommunicationLogInput = z.infer; export type CommunicationListQuery = z.infer; export type CreateSegmentInput = z.infer; export declare const organizationEntityType = "organization"; export declare const personEntityType = "person"; export declare const personBaseIdentitySource = "relationships.person.base"; type PersonIdentityInput = { email?: string | null; phone?: string | null; website?: string | null; }; export type PersonHydratedFields = { email: string | null; phone: string | null; website: string | null; }; type HydratePeopleOptions = { fallbackOnError?: boolean; }; export declare function personBaseFields(data: CreatePersonInput | UpdatePersonInput): { organizationId: string | null | undefined; firstName: string | undefined; middleName: string | null | undefined; lastName: string | undefined; gender: "M" | "F" | "X" | null | undefined; jobTitle: string | null | undefined; relation: "client" | "partner" | "supplier" | "other" | null | undefined; preferredLanguage: string | null | undefined; preferredCurrency: string | null | undefined; ownerId: string | null | undefined; status: "active" | "inactive" | "archived" | undefined; source: string | null | undefined; sourceRef: string | null | undefined; tags: string[] | undefined; customFields: Record> | undefined; dateOfBirth: string | null | undefined; notes: string | null | undefined; accessibilityEncrypted: { enc: string; } | { enc: string; } | null | undefined; dietaryEncrypted: { enc: string; } | { enc: string; } | null | undefined; loyaltyEncrypted: { enc: string; } | { enc: string; } | null | undefined; insuranceEncrypted: { enc: string; } | { enc: string; } | null | undefined; }; export declare function syncPersonIdentity(db: PostgresJsDatabase, personId: string, data: PersonIdentityInput): Promise; export declare function deletePersonIdentity(db: PostgresJsDatabase, personId: string): Promise; export declare function hydratePeople(db: PostgresJsDatabase, rows: T[], options?: HydratePeopleOptions): Promise>; export {};