contacts: owners' contacts on their desk phones, copy builtin contacts to Contrack (C6)
ci / check (push) Successful in 1m2s
ci / images (push) Successful in 20s
ci / check (pull_request) Successful in 1m4s
ci / images (pull_request) Successful in 5s

Spec 11 §6.2: a phone's directory is the extensions, its owner's own contacts (accepted shares
included), then the company's, in both modes. In Contrack mode, contacts from before Contrack
are offered for copying (contrack.toCopy, POST …/copy-to-contrack: one Contrack bulk import,
skipping what's already there; the builtin rows stay). Tested against a fake and a real
Contrack 2.0.2.
This commit is contained in:
iamdoubz committed 2026-10-23 16:07:19 -05:00
1 parent e6a1373f36
commit 604e40adf1
16 files changed
+294 -15

No files matched your search

+10 -1
View File
@@ -53,9 +53,18 @@ export type ContactBookDto = {
items: ContactDto[];
provider: 'builtin' | 'contrack';
/** Contrack mode: the address people open, and whether this book's token works. */
contrack: { publicUrl: string | null; connected: boolean; error: string | null } | null;
contrack: {
publicUrl: string | null;
connected: boolean;
error: string | null;
/** Contacts still only in the builtin book (from before Contrack): "Copy them" (11 §5). */
toCopy: number;
} | null;
};
/** POST …/contacts/copy-to-contrack (11 §5, C6). */
export type ContactCopyResult = { added: number; duplicates: number; failed: number };
/** POST …/contacts/import: the files' text, read in the browser. */
export const ContactImportSchema = z.object({
files: z