import { PagedResponse, Pagination } from '../core'; export interface ContactsModule { create: (contact: ContactImport, scope: Scope) => Promise; update: (contact: ContactUpdate) => Promise; deleteAllPrivate: () => Promise; deleteAllShared: () => Promise; delete: (id: string) => Promise; importFromCsvString: (csvContent: string) => Promise; importVCardString: (vcardContent: string, scope: Scope) => Promise; paginatedExportAsCsv: (scope: ExportScope, delimiter?: string, pagination?: Pagination, filter?: ContactsExportFilter) => Promise>; /** * @deprecated You should prefer to use `paginatedExportAsCSV` */ exportAsCsv: (scope: ExportScope, delimiter?: string, pagination?: Pagination, filter?: ContactsExportFilter) => Promise; paginatedExportAsVCards: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise>; paginatedExportAsJSON: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise>; /** * @deprecated You should prefer to use `paginatedExportAsJSON` */ exportAsJSON: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise; /** * @deprecated You should prefer to use `paginatedExportAsVCards` */ exportAsVCards: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise; paginatedExportAsSingleVCard: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise>; /** * @deprecated You should prefer to use `paginatedExportAsSingleVCard` */ exportAsSingleVCard: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise; paginatedGet: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise>; /** * @deprecated You should prefer to use `paginatedGet` */ get: (scope: ExportScope, pagination?: Pagination, filter?: ContactsExportFilter) => Promise; } export interface ContactImport { firstname: string; lastname: string; address?: Address; phone?: PhoneNumber; email?: Email; picture?: string; organization?: string[][]; } export interface Email { email: string; type: string[]; } export interface PhoneNumber { number: string; type: string[]; } export interface Address { poBox: string; extendedAddress: string; streetAddress: string; locality: string; region: string; postalCode: string; country: string; } export interface ContactsDTO { name: string; family: string; given: string; picture: string | null; emails: Email[]; numbers: PhoneNumber[]; addresses: Address[]; organization: string[][]; scope: Scope; } export declare type Scope = 'PRIVATE' | 'SHARED'; declare type ExportScope = Scope | 'INTERNAL' | 'ALL'; export declare type ContactUpdate = ContactResponse; export interface ContactResponse { id: string; name: string; picture: string | null; emails: Email[]; numbers: PhoneNumber[]; addresses: Address[]; organization: string[][]; scope: Scope; } export interface ContactsListResponse { items: ContactResponse[]; totalCount: number; } export interface ContactsExportFilter { phonenumbers: string[]; } export interface ImportCSVRequestDTO { base64Content: string; } export {};