import type * as IShared from '../../../shared/interface'; import type { Persona, Country, ReasonForExemption } from '../../../shared/entities/user'; export type Entity = Persona; export declare const Route = "persona"; export declare const UpperName = "Persona"; export declare const LowerName: string; export interface IEntityExtended extends Entity { formatted_address: string; country: Country | null; reason_for_exemption: ReasonForExemption | null; } export interface IFindByOwnerIdResponse extends IEntityExtended { main: boolean; contact: boolean; } export interface ICreateRequest { external: boolean; name: string | null; nif: string | null; street: string | null; postal_code: string | null; locality: string | null; country_id: string | null; telephone: string | null; email: string | null; observations: string | null; provider_id: string | null; client_id: string | null; commissioner_id: string | null; store_operator_id: string | null; reason_for_exemption_id: string | null; language_id: string | null; main?: boolean; contact?: boolean; } export interface IUpdateRequest { external?: boolean; name?: string | null; nif?: string | null; street?: string | null; postal_code?: string | null; locality?: string | null; country_id?: string | null; telephone?: string | null; email?: string | null; observations?: string | null; reason_for_exemption_id?: string | null; language_id?: string | null; main?: boolean; contact?: boolean; } export interface IBasicSearchRequest extends IShared.IPaginationRequest { search_value: string | null; inactive?: boolean; types?: string; } export interface IBasicSearchResponse { id: string; name: string; number: number; updated_at: Date; } export interface IFindRequest { search_value: string; } export interface IFindResponse { persona_id: string; persona_name: string | null; persona_nif: string | null; persona_street: string | null; persona_postal_code: string | null; persona_locality: string | null; persona_country_id: string | null; } export interface IDeletePersonaRequest { id: string; new_main_persona_id?: string; } export interface IFindByEmailRequest { email: string; } export interface IFindByEmailResponse { persona_id: string; persona_name: string; persona_nif: string | null; client?: { id: string; name: string; } | null; provider?: { id: string; name: string; } | null; commissioner?: { id: string; name: string; } | null; } export interface IFindClientOrProviderRequest { nif?: string | null; email?: string | null; telephone?: string | null; user_type: 'client' | 'provider'; } export interface IFindClientOrProviderResponse { client_id: string | null; provider_id: string | null; nif: string | null; name: string | null; email: string | null; telephone: string | null; } export interface IFindForGmailRequest { owner_id: string; email: string; } export interface IFindForGmailResponse { chat_persona_name: string; } export interface IPublicUpdateRequest { language_id: string | null; } export interface IRepository { findById(selector: IShared.IFindByIdRequest): Promise; findByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise; create(data: ICreateRequest): Promise; update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise; deleteOne(params: IDeletePersonaRequest): Promise; findByBasic(data: IBasicSearchRequest): Promise>; findForBillOfLading(data: IFindRequest): Promise; findByEmail(data: IFindByEmailRequest): Promise; findClientOrProvider(data: IFindClientOrProviderRequest): Promise; findForGmail(data: IFindForGmailRequest): Promise; publicUpdate(selector: IShared.IFindByIdRequest, data: IPublicUpdateRequest): Promise; } export type IController = IShared.IEntityWithUserToken;