@mccaskie-labs/workbench-contacts 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # @mccaskie-labs/workbench-contacts
2
+
3
+ ## 0.1.0
4
+
5
+ - First version: simple customer records in the app's own database. `record()` from forms, bookings, payments, quotes, reviews and WhatsApp or Messenger messages (no SMS), matched by email, then phone, then Messenger id; search, a spreadsheet export, a person's own copy, opt-outs that stick, delete on request and a daily clean-up; the owner's Customers list and customer page with `wb-contact-*` classes; words in English, Tagalog and Taglish; `npx workbench-contacts init | generate | migration`.
package/README.md CHANGED
@@ -1,3 +1,77 @@
1
- # Temporary Holding Version
1
+ # @mccaskie-labs/workbench-contacts
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Simple customer records for apps built on Workbench, a private platform: one list of the people a business deals with, kept in the app's **own** database and filled as the app's tools meet them (a form sent, a booking made, a payment taken, a quote sent, a review left, a WhatsApp or Messenger message read). Search, a spreadsheet download, a person's own copy on request, opt-outs that stick, delete on request and a daily clean-up. Published publicly so Workbench projects can install it with no token; it is not supported for other uses.
4
+
5
+ ```sh
6
+ npm install @mccaskie-labs/workbench-contacts
7
+ ```
8
+
9
+ Workbench never sees the list: it runs in the app, over the app's Supabase project, with no Gateway call.
10
+
11
+ ## Set up
12
+
13
+ 1. `npx workbench-contacts init` writes `workbench/contacts.json` with the recommended answers. The client questions in `capabilities/contacts.json` say how to change them; set `time_zone` from `workbench/country.json`.
14
+ 2. `npx workbench-contacts generate` checks it and writes `src/contacts.generated.ts` (`CONTACT_SETTINGS`). Checks can run `npx workbench-contacts generate --check`.
15
+ 3. `npx workbench-contacts migration` writes `contactsMigration` and its down file. It creates functions, so Control asks for approval even on staging.
16
+
17
+ ```json
18
+ { "format": 1, "sources": ["form", "booking", "payment", "quote", "review", "message"], "keep": ["name", "email", "phone"], "retention_months": 24, "marketing": "ask", "time_zone": "Australia/Sydney", "notes": true }
19
+ ```
20
+
21
+ ## Use
22
+
23
+ ```ts
24
+ import { createContacts } from '@mccaskie-labs/workbench-contacts'
25
+ import { packFor } from '@mccaskie-labs/workbench-country'
26
+ import { CONTACT_SETTINGS } from './contacts.generated'
27
+
28
+ const contacts = createContacts({ db: serviceClient, settings: CONTACT_SETTINGS, phone: packFor('AU').phone })
29
+
30
+ // Where each tool succeeds. Never let it undo the booking:
31
+ ctx.waitUntil(contacts.record({
32
+ account: business.id,
33
+ person: { name, email, phone }, // messenger: the Page-scoped id, if kept
34
+ from: { kind: 'booking', type: 'booking', id: booking.id },
35
+ consent: ticked ? { marketing: 'yes', wording: 'Send me news and offers' } : undefined,
36
+ }).catch(console.error))
37
+
38
+ // A form, by forms' one personal-detail rule:
39
+ await contacts.recordForm({ account, fields: formData(answers).properties, values, from: { kind: 'form', type: 'enquiry', id } })
40
+
41
+ // scheduled(), once a day:
42
+ ctx.waitUntil(contacts.cleanup())
43
+ ```
44
+
45
+ - **One person, found again.** By email, then phone, then Messenger id, each unique within the account. Phones are kept as `+<country code><number>`, so `0412 345 678` and `+61 412 345 678` match (pass the country pack's `phone`). A later record only **adds** a missing detail, never overwrites one, so the owner's corrections stay; a detail another customer already has is left off, never merged. Two records of a new person at once make one contact.
46
+ - **Ids, not content.** The history is the tool's kind and the app's own row id (`booking 7f…`). Never a message, a review's words, an amount or a card.
47
+ - **Least kept.** A detail not in `keep` is dropped before anything is written, and named in the result's `dropped`. A source not in `sources`, or a person with no email, phone or Messenger id, is skipped (`skipped: "source_off" | "no_detail"`), writing nothing.
48
+ - **Consent.** `marketing` is `unknown` until the person says. A yes needs `wording`, the words next to the box they ticked (proof of consent). `optOut({ email })` (an unsubscribe link or a stop reply) and the owner's Stop news and offers make it `no`, which sticks: only the person's own newer yes undoes it. With `marketing: "off"` no yes is kept at all.
49
+ - **Rights.** `exportPerson(account, id)` is everything kept about one person, as JSON, for their request to see it; `update()` corrects; `forget()` deletes them and their history. `cleanup()` deletes people not in touch for `retention_months`.
50
+ - `search(account, { query, marketing, limit, offset })`: part of a name or email (wildcards taken literally) or three or more digits of a phone; latest seen first.
51
+ - `exportCsv(account, { marketing })`: UTF-8 with a byte order mark for Excel, dates in the project's time zone, a column per kind of history, and formulas defused.
52
+
53
+ ## The owner's pages
54
+
55
+ ```ts
56
+ import { contactAction, renderContact, renderContactList } from '@mccaskie-labs/workbench-contacts'
57
+
58
+ html = renderContactList(await contacts.search(account, { query: q }), { endpoint: '/app/customers', query: q, contactUrl: (c) => `/app/customers/${c.id}`, exportUrl: '/app/customers.csv', timeZone: contacts.settings.time_zone })
59
+ html = renderContact(await contacts.get(account, id), { endpoint: '/app/customers/action', keep: contacts.settings.keep, marketing: contacts.settings.marketing === 'ask', downloadUrl: `/app/customers/${id}.json`, timeZone: contacts.settings.time_zone })
60
+ // Its forms post here, behind the owner's sign-in:
61
+ const r = await contactAction(contacts, fields, account) // save, stop_marketing, or forget (needs confirm=yes)
62
+ ```
63
+
64
+ The owner's page offers Stop news and offers, never a yes. Delete needs its tick box. Every element carries a `wb-contact-*` class with a default style (`CONTACT_STYLES`, written by `npx workbench-ui styles`). Words are in `CONTACT_WORDS` (English, Tagalog, Taglish) under `ui.wbcontact.*`.
65
+
66
+ ## Data
67
+
68
+ | Table | Holds | Kept |
69
+ | --- | --- | --- |
70
+ | `contacts` | account, name, email, phone, Messenger id, marketing yes/no/unknown with when, where and the words agreed to, the owner's note, first and last in touch | until deleted on request, or `retention_months` after last in touch |
71
+ | `contact_events` | the kind of tool and the app's own row id, with when | with its contact |
72
+
73
+ Both have RLS on with no policies; the functions are the service role's only.
74
+
75
+ ## Privacy
76
+
77
+ The business is the one that decides what is kept, so it answers for it under Australia's Privacy Act 1988 (if it is covered) and the Philippines' Data Privacy Act 2012. The package keeps the least that does the job, deletes on a schedule, and gives the owner what they need for access, correction, deletion and opt-out requests. Australia's Spam Act 2003 needs consent before news or offers, and a working way to stop; so does the Data Privacy Act's consent rule. The app's privacy page should say what the list keeps, why, for how long, and how to ask for a copy or deletion. This is a reading of the rules, not legal advice.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import type { ContactSettings } from "./types.ts";
3
+ export declare const CONTACTS_FILE = "workbench/contacts.json";
4
+ export declare const CONTACTS_MODULE = "src/contacts.generated.ts";
5
+ /** The generated module for checked settings. */
6
+ export declare function moduleText(c: ContactSettings): string;
7
+ /** Reads and checks the project's contacts.json. Throws naming every problem. */
8
+ export declare function readContacts(dir: string): ContactSettings;
9
+ /** Runs one command; returns the exit code. */
10
+ export declare function run(argv: string[], log?: (s: string) => void, err?: (s: string) => void): number;
package/dist/cli.js ADDED
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ // `npx workbench-contacts init [dir]`, run in a project's folder: writes
3
+ // workbench/contacts.json with the recommended answers. A file already there
4
+ // is left as it is.
5
+ //
6
+ // `npx workbench-contacts generate [--check] [dir]` reads
7
+ // workbench/contacts.json, checks it, and writes src/contacts.generated.ts:
8
+ // CONTACT_SETTINGS for createContacts. --check writes nothing and fails when
9
+ // the file is out of date or wrong.
10
+ //
11
+ // `npx workbench-contacts migration [dir]` writes contactsMigration into
12
+ // supabase/migrations/<timestamp>_workbench_contacts.sql, and its down file
13
+ // into supabase/rollback/, unless a contacts migration is already there.
14
+ import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
15
+ import { dirname, join, resolve } from "node:path";
16
+ import { fileURLToPath } from "node:url";
17
+ import { contactProblems } from "./config.js";
18
+ import { contactsMigration } from "./migration.js";
19
+ import { STARTER_CONTACTS } from "./starters.js";
20
+ const USAGE = "usage: workbench-contacts init [dir]\n workbench-contacts generate [--check] [dir]\n workbench-contacts migration [dir]";
21
+ export const CONTACTS_FILE = "workbench/contacts.json";
22
+ export const CONTACTS_MODULE = "src/contacts.generated.ts";
23
+ const read = (path) => readFileSync(path, "utf8").replace(/\r\n/g, "\n");
24
+ /** The generated module for checked settings. */
25
+ export function moduleText(c) {
26
+ return [
27
+ `// Generated by \`npx workbench-contacts generate\` from ${CONTACTS_FILE}. Don't edit: change the`,
28
+ "// JSON and generate again (Checks runs `npx workbench-contacts generate --check`).",
29
+ "",
30
+ 'import type { ContactSettings } from "@mccaskie-labs/workbench-contacts";',
31
+ "",
32
+ `export const CONTACT_SETTINGS = ${JSON.stringify(c, null, 2)} as const satisfies ContactSettings;`,
33
+ "",
34
+ ].join("\n");
35
+ }
36
+ /** Reads and checks the project's contacts.json. Throws naming every problem. */
37
+ export function readContacts(dir) {
38
+ const path = join(dir, CONTACTS_FILE);
39
+ if (!existsSync(path))
40
+ throw new Error(`${CONTACTS_FILE} is missing: run npx workbench-contacts init, then answer the contacts questions (capabilities/contacts.json, offer)`);
41
+ let parsed;
42
+ try {
43
+ parsed = JSON.parse(read(path));
44
+ }
45
+ catch (e) {
46
+ throw new Error(`${CONTACTS_FILE}: not valid JSON (${e.message})`);
47
+ }
48
+ const problems = contactProblems(parsed, CONTACTS_FILE);
49
+ if (problems.length)
50
+ throw new Error(problems.join("\n"));
51
+ return parsed;
52
+ }
53
+ function migrationStamp(at) {
54
+ return at.toISOString().replace(/[-:T]/g, "").slice(0, 14);
55
+ }
56
+ /** Runs one command; returns the exit code. */
57
+ export function run(argv, log = console.log, err = console.error) {
58
+ const [command, ...args] = argv;
59
+ const check = args.includes("--check");
60
+ const rest = args.filter((a) => a !== "--check");
61
+ const bad = rest.find((a) => a.startsWith("--"));
62
+ if (!["init", "generate", "migration"].includes(command ?? "") || bad || (check && command !== "generate") || rest.length > 1) {
63
+ err(bad ? `${bad} isn't an option\n${USAGE}` : USAGE);
64
+ return 2;
65
+ }
66
+ const dir = resolve(rest[0] ?? ".");
67
+ try {
68
+ if (command === "init") {
69
+ const at = join(dir, CONTACTS_FILE);
70
+ if (existsSync(at)) {
71
+ log(`${CONTACTS_FILE} is already there; left as it is`);
72
+ return 0;
73
+ }
74
+ mkdirSync(dirname(at), { recursive: true });
75
+ writeFileSync(at, `${JSON.stringify(STARTER_CONTACTS, null, 2)}\n`);
76
+ log(`wrote ${CONTACTS_FILE}`);
77
+ log("Now set time_zone to the country pack's, answer the contacts questions, and run `npx workbench-contacts generate`.");
78
+ return 0;
79
+ }
80
+ if (command === "migration") {
81
+ const folder = join(dir, "supabase/migrations");
82
+ if (existsSync(folder) && readdirSync(folder).some((f) => f.endsWith("_workbench_contacts.sql"))) {
83
+ log("supabase/migrations already has the contacts migration; nothing written");
84
+ return 0;
85
+ }
86
+ const name = `${migrationStamp(new Date())}_workbench_contacts.sql`;
87
+ mkdirSync(folder, { recursive: true });
88
+ mkdirSync(join(dir, "supabase/rollback"), { recursive: true });
89
+ writeFileSync(join(folder, name), `-- workbench-contacts: simple customer records\n${contactsMigration.up}`);
90
+ writeFileSync(join(dir, "supabase/rollback", name.replace(/\.sql$/, "_down.sql")), `-- Reverses ${name}\n${contactsMigration.down}`);
91
+ log(`wrote supabase/migrations/${name} and its down file`);
92
+ return 0;
93
+ }
94
+ const settings = readContacts(dir);
95
+ const text = moduleText(settings);
96
+ const out = join(dir, CONTACTS_MODULE);
97
+ if (check) {
98
+ if (!existsSync(out) || read(out) !== text) {
99
+ err(`${CONTACTS_MODULE} is out of date: run npx workbench-contacts generate`);
100
+ return 1;
101
+ }
102
+ log(`${CONTACTS_MODULE} is up to date`);
103
+ return 0;
104
+ }
105
+ mkdirSync(dirname(out), { recursive: true });
106
+ writeFileSync(out, text);
107
+ log(`wrote ${CONTACTS_MODULE}: sources ${settings.sources.join(", ")}; keeps ${settings.keep.join(", ")}`);
108
+ return 0;
109
+ }
110
+ catch (e) {
111
+ err(e.message);
112
+ return 1;
113
+ }
114
+ }
115
+ const isMain = (() => {
116
+ try {
117
+ return process.argv[1] !== undefined && realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
118
+ }
119
+ catch {
120
+ return false;
121
+ }
122
+ })();
123
+ if (isMain)
124
+ process.exitCode = run(process.argv.slice(2));
@@ -0,0 +1,5 @@
1
+ import { type ContactSettings } from "./types.ts";
2
+ /** Every problem with a contacts.json, or none. */
3
+ export declare function contactProblems(value: unknown, where?: string): string[];
4
+ /** Checks workbench/contacts.json and returns it typed, or throws bad_config naming every problem. */
5
+ export declare function checkContactSettings(value: unknown): ContactSettings;
package/dist/config.js ADDED
@@ -0,0 +1,59 @@
1
+ // workbench/contacts.json: checked here, by createContacts and by
2
+ // `npx workbench-contacts generate`.
3
+ import { ContactsError } from "./errors.js";
4
+ import { DETAIL_KINDS, SOURCE_KINDS } from "./types.js";
5
+ const TOP = ["$schema", "format", "sources", "keep", "retention_months", "marketing", "time_zone", "notes"];
6
+ const isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
7
+ function validZone(v) {
8
+ if (typeof v !== "string" || !v)
9
+ return false;
10
+ try {
11
+ new Intl.DateTimeFormat("en", { timeZone: v });
12
+ return true;
13
+ }
14
+ catch {
15
+ return false;
16
+ }
17
+ }
18
+ function list(value, allowed, key, p) {
19
+ if (!Array.isArray(value) || value.length === 0 || !value.every((x) => typeof x === "string" && allowed.includes(x))) {
20
+ p.push(`${key} must list one or more of ${allowed.join(", ")}`);
21
+ }
22
+ else if (new Set(value).size !== value.length)
23
+ p.push(`${key} names something twice`);
24
+ }
25
+ /** Every problem with a contacts.json, or none. */
26
+ export function contactProblems(value, where = "contacts.json") {
27
+ const p = [];
28
+ if (!isObj(value))
29
+ return [`${where}: not a JSON object`];
30
+ for (const k of Object.keys(value))
31
+ if (!TOP.includes(k))
32
+ p.push(`${k} isn't a contacts setting`);
33
+ if (value.format !== 1)
34
+ p.push("format must be 1");
35
+ list(value.sources, SOURCE_KINDS, "sources", p);
36
+ if (Array.isArray(value.sources) && value.sources.includes("sms"))
37
+ p.push("sources: there is no SMS; WhatsApp and Messenger messages are the message source");
38
+ list(value.keep, DETAIL_KINDS, "keep", p);
39
+ if (Array.isArray(value.keep) && !value.keep.some((k) => k === "email" || k === "phone" || k === "messenger")) {
40
+ p.push("keep must include email, phone or messenger, so a person can be found again");
41
+ }
42
+ const r = value.retention_months;
43
+ if (r !== undefined && (!Number.isInteger(r) || r < 1 || r > 120))
44
+ p.push("retention_months must be a whole number from 1 to 120");
45
+ if (value.marketing !== "ask" && value.marketing !== "off")
46
+ p.push('marketing must be "ask" or "off"');
47
+ if (!validZone(value.time_zone))
48
+ p.push("time_zone must be an IANA time zone, such as Australia/Sydney");
49
+ if (value.notes !== undefined && typeof value.notes !== "boolean")
50
+ p.push("notes must be true or false");
51
+ return p.map((x) => `${where}: ${x}`);
52
+ }
53
+ /** Checks workbench/contacts.json and returns it typed, or throws bad_config naming every problem. */
54
+ export function checkContactSettings(value) {
55
+ const problems = contactProblems(value);
56
+ if (problems.length)
57
+ throw new ContactsError("bad_config", problems.join("; "));
58
+ return value;
59
+ }
@@ -0,0 +1,128 @@
1
+ import { type PhoneCountry } from "./tidy.ts";
2
+ import { type Contact, type ContactDetail, type ContactSettings, type DetailKind, type Lang, type PersonDetails, type SearchResult, type Source, type SourceKind } from "./types.ts";
3
+ type DbError = {
4
+ message?: string;
5
+ code?: string;
6
+ details?: string;
7
+ } | null;
8
+ /** The part of a Supabase client contacts need. Any supabase-js client fits; use the service client. */
9
+ export interface ContactsClient {
10
+ rpc(fn: string, args: Record<string, unknown>): PromiseLike<{
11
+ data: unknown;
12
+ error: DbError;
13
+ }>;
14
+ }
15
+ export interface ContactsOptions {
16
+ /** The service client. */
17
+ db: ContactsClient;
18
+ /** workbench/contacts.json, or CONTACT_SETTINGS from src/contacts.generated.ts. Checked here. */
19
+ settings: unknown;
20
+ /** The country pack's phone shape (workbench-country's pack.phone), so "0412 345 678" or "0917 123 4567" is read. Without it only numbers with their country code are kept. */
21
+ phone?: PhoneCountry;
22
+ /** The clock, for tests. */
23
+ now?: () => Date;
24
+ }
25
+ /** A person's yes or no to news and offers, from a box they ticked (or unticked) themselves. Never implied by a booking, payment or quote. */
26
+ export interface ConsentGiven {
27
+ marketing: "yes" | "no";
28
+ /** The words next to the box, exactly as the person saw them. Needed for yes: it is the proof of consent. */
29
+ wording?: string;
30
+ }
31
+ export interface RecordRequest {
32
+ /** The app's account (the business) the person belongs to. */
33
+ account: string;
34
+ person: PersonDetails;
35
+ from: Source;
36
+ consent?: ConsentGiven;
37
+ }
38
+ /** What record() did. A detail that couldn't be read, or that this project doesn't keep, is named in `dropped`. */
39
+ export type RecordResult = {
40
+ contact: Contact;
41
+ created: boolean;
42
+ dropped: DetailKind[];
43
+ }
44
+ /** Nothing written: the source is switched off in contacts.json, or there was no email, phone or Messenger id to find the person by. */
45
+ | {
46
+ contact: null;
47
+ created: false;
48
+ dropped: DetailKind[];
49
+ skipped: "source_off" | "no_detail";
50
+ };
51
+ /** One field of a form as workbench-forms' formData() describes it: only `personal` is read. */
52
+ export interface FormFieldInfo {
53
+ personal?: "name" | "handle" | "phone" | "email" | "address" | "photo";
54
+ }
55
+ export interface FormRecordRequest {
56
+ account: string;
57
+ /** formData(answers).properties from workbench-forms/answers: each field's personal kind, by forms' one personal-detail rule. */
58
+ fields: Readonly<Record<string, FormFieldInfo>>;
59
+ /** The submitted values, after validate(). */
60
+ values: Readonly<Record<string, unknown>>;
61
+ /** The app's row for this submission. Default { kind: "form", type: "form", id }. */
62
+ from: Source;
63
+ consent?: ConsentGiven;
64
+ /** Which handle field holds a Messenger id, if any. Other handles are not kept. */
65
+ messengerField?: string;
66
+ }
67
+ export interface SearchOptions {
68
+ /** Part of a name or email, or three or more digits of a phone. */
69
+ query?: string;
70
+ /** Only people who said yes to marketing. */
71
+ marketing?: boolean;
72
+ /** Default 50, at most 200. */
73
+ limit?: number;
74
+ offset?: number;
75
+ }
76
+ export interface ContactChanges {
77
+ name?: string | null;
78
+ email?: string | null;
79
+ phone?: string | null;
80
+ messenger?: string | null;
81
+ note?: string | null;
82
+ }
83
+ export interface ExportOptions {
84
+ /** Only people who said yes to marketing (a mailing list). Refused when contacts.json has marketing "off". */
85
+ marketing?: boolean;
86
+ /** The column headings' language. Default en. */
87
+ lang?: Lang;
88
+ }
89
+ export interface Contacts {
90
+ /** A tool met a person: find them or add them, note the tool's row, and take their own yes or no to marketing. Safe to call twice for the same row. */
91
+ record(req: RecordRequest): Promise<RecordResult>;
92
+ /** record() from a form submission: the name, email, phone and Messenger fields are picked by forms' personal-detail rule. */
93
+ recordForm(req: FormRecordRequest): Promise<RecordResult>;
94
+ /** One contact with what pointed at them, or null (also for another account's). */
95
+ get(account: string, id: string): Promise<ContactDetail | null>;
96
+ /** The account's contacts, the latest seen first. */
97
+ search(account: string, opts?: SearchOptions): Promise<SearchResult>;
98
+ /** The owner's correction. Refused with `taken` when another contact has that email, phone or Messenger id. */
99
+ update(account: string, id: string, changes: ContactChanges): Promise<Contact>;
100
+ /** Records a yes or no for one contact: a yes needs the words the person agreed to. The owner's own pages only ever offer no. */
101
+ setMarketing(account: string, id: string, consent: ConsentGiven & {
102
+ source?: SourceKind | "owner" | "unsubscribe";
103
+ }): Promise<Contact>;
104
+ /** An unsubscribe link or a stop reply: whoever in the account has this email, phone or Messenger id says no. How many changed. */
105
+ optOut(account: string, who: PersonDetails): Promise<number>;
106
+ /** Deletes the person and what pointed at them. True when there was one. */
107
+ forget(account: string, id: string): Promise<boolean>;
108
+ /** The account's list as a CSV for Excel or Google Sheets (UTF-8, formulas defused). */
109
+ exportCsv(account: string, opts?: ExportOptions): Promise<string>;
110
+ /** Everything kept about one person, for their request to see it (JSON). Null when there's no such contact. */
111
+ exportPerson(account: string, id: string): Promise<PersonExport | null>;
112
+ /** The daily clean-up: people who haven't been back in retention_months. */
113
+ cleanup(): Promise<{
114
+ contacts: number;
115
+ }>;
116
+ readonly settings: ContactSettings;
117
+ }
118
+ /** What exportPerson() hands over: the details, the consent, and what pointed at them. */
119
+ export interface PersonExport {
120
+ format: 1;
121
+ exported_at: string;
122
+ contact: ContactDetail;
123
+ kept_because: string;
124
+ }
125
+ /** An ILIKE pattern for part of a name or email, with its own wildcards escaped. */
126
+ export declare function likePattern(query: string): string;
127
+ export declare function createContacts(opts: ContactsOptions): Contacts;
128
+ export {};