@voyantjs/crm 0.52.3 → 0.53.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/dist/service/accounts-resolve.d.ts +71 -0
- package/dist/service/accounts-resolve.d.ts.map +1 -0
- package/dist/service/accounts-resolve.js +100 -0
- package/dist/service/accounts.d.ts +5 -0
- package/dist/service/accounts.d.ts.map +1 -1
- package/dist/service/accounts.js +4 -0
- package/dist/service/index.d.ts +2 -0
- package/dist/service/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
+
import type { people } from "../schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* Best-effort contact snapshot used by booking/storefront flows to
|
|
5
|
+
* resolve (or upsert) a CRM person from billing or traveler payloads.
|
|
6
|
+
* Empty-string and whitespace-only fields are normalized to `null`.
|
|
7
|
+
*/
|
|
8
|
+
export interface PersonContactInput {
|
|
9
|
+
firstName?: string | null;
|
|
10
|
+
lastName?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Single-string display name when first/last aren't provided
|
|
13
|
+
* separately — split on whitespace.
|
|
14
|
+
*/
|
|
15
|
+
name?: string | null;
|
|
16
|
+
email?: string | null;
|
|
17
|
+
phone?: string | null;
|
|
18
|
+
preferredLanguage?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface UpsertPersonFromContactOptions {
|
|
21
|
+
/** `source` recorded on the `people` row (`"storefront-booking"`, etc.). */
|
|
22
|
+
source?: string | null;
|
|
23
|
+
/** `source_ref` recorded on the `people` row — e.g. the session id. */
|
|
24
|
+
sourceRef?: string | null;
|
|
25
|
+
/** Tags propagated to the new person when one is created. */
|
|
26
|
+
tags?: string[];
|
|
27
|
+
/** Status override; defaults to `"active"`. */
|
|
28
|
+
status?: "active" | "inactive";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Derives `{ firstName, lastName }` for a CRM person from whatever
|
|
32
|
+
* contact bits the caller has. Mirrors the storefront-intake helpers
|
|
33
|
+
* (`personNameFromContact` / `personNameFromNewsletter`) so identity
|
|
34
|
+
* resolution from booking/traveler payloads stays symmetric. Falls
|
|
35
|
+
* back to the email local-part before resorting to literal placeholders
|
|
36
|
+
* — `people.first_name`/`last_name` are NOT NULL and the issue #961
|
|
37
|
+
* acceptance criteria call out that the literal `"Unknown"` should
|
|
38
|
+
* never be inserted.
|
|
39
|
+
*/
|
|
40
|
+
export declare function personNameFromContact(input: PersonContactInput): {
|
|
41
|
+
firstName: string;
|
|
42
|
+
lastName: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Returns the first person whose normalized contact point matches
|
|
46
|
+
* `(kind, value)`. Email and website are normalized to lowercase; phone
|
|
47
|
+
* is trimmed. Returns `null` when no match exists, the value resolves to
|
|
48
|
+
* an empty string, or the matching contact point is attached to a
|
|
49
|
+
* non-person entity (organizations share the same table).
|
|
50
|
+
*/
|
|
51
|
+
export declare function findPersonByContactPoint(db: PostgresJsDatabase, query: {
|
|
52
|
+
kind: "email" | "phone" | "website";
|
|
53
|
+
value: string | null | undefined;
|
|
54
|
+
}): Promise<typeof people.$inferSelect | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Finds an existing CRM person by normalized email (then phone as a
|
|
57
|
+
* fallback) or creates a new one from the supplied contact snapshot.
|
|
58
|
+
* Used by booking session bootstrap + confirm flows so storefront
|
|
59
|
+
* bookings produce a real CRM record without each consumer reinventing
|
|
60
|
+
* the dedupe key. The created row carries the supplied `source` /
|
|
61
|
+
* `sourceRef` so the audit trail mirrors lead/newsletter signals.
|
|
62
|
+
*
|
|
63
|
+
* Lookup order: email → phone. The first hit wins; ties never happen
|
|
64
|
+
* because identity contact points are unique per `(kind, normalized)`
|
|
65
|
+
* for a given entity but consumers can re-use the same email across
|
|
66
|
+
* people via the unique-by-person sync logic. In that case the first
|
|
67
|
+
* person we see is returned — callers that need stricter ownership
|
|
68
|
+
* semantics should resolve themselves and pass a `personId` directly.
|
|
69
|
+
*/
|
|
70
|
+
export declare function upsertPersonFromContact(db: PostgresJsDatabase, contact: PersonContactInput, options?: UpsertPersonFromContactOptions): Promise<typeof people.$inferSelect | null>;
|
|
71
|
+
//# sourceMappingURL=accounts-resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts-resolve.d.ts","sourceRoot":"","sources":["../../src/service/accounts-resolve.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAK1C;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAClC;AAED,MAAM,WAAW,8BAA8B;IAC7C,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,+CAA+C;IAC/C,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;CAC/B;AAaD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG;IAChE,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CACjB,CAUA;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,EAAE,EAAE,kBAAkB,EACtB,KAAK,EAAE;IAAE,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC/E,OAAO,CAAC,OAAO,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAmB5C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,uBAAuB,CAC3C,EAAE,EAAE,kBAAkB,EACtB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE,8BAAmC,GAC3C,OAAO,CAAC,OAAO,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CA4B5C"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { identityContactPoints } from "@voyantjs/identity/schema";
|
|
2
|
+
import { and, eq } from "drizzle-orm";
|
|
3
|
+
import { peopleAccountsService } from "./accounts-people.js";
|
|
4
|
+
import { personEntityType } from "./accounts-shared.js";
|
|
5
|
+
import { normalizeContactValue, toNullableTrimmed } from "./helpers.js";
|
|
6
|
+
function splitName(name) {
|
|
7
|
+
if (!name)
|
|
8
|
+
return {};
|
|
9
|
+
const parts = name.trim().split(/\s+/);
|
|
10
|
+
if (parts.length === 0)
|
|
11
|
+
return {};
|
|
12
|
+
if (parts.length === 1)
|
|
13
|
+
return { firstName: parts[0] };
|
|
14
|
+
return { firstName: parts[0], lastName: parts.slice(1).join(" ") };
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Derives `{ firstName, lastName }` for a CRM person from whatever
|
|
18
|
+
* contact bits the caller has. Mirrors the storefront-intake helpers
|
|
19
|
+
* (`personNameFromContact` / `personNameFromNewsletter`) so identity
|
|
20
|
+
* resolution from booking/traveler payloads stays symmetric. Falls
|
|
21
|
+
* back to the email local-part before resorting to literal placeholders
|
|
22
|
+
* — `people.first_name`/`last_name` are NOT NULL and the issue #961
|
|
23
|
+
* acceptance criteria call out that the literal `"Unknown"` should
|
|
24
|
+
* never be inserted.
|
|
25
|
+
*/
|
|
26
|
+
export function personNameFromContact(input) {
|
|
27
|
+
const split = splitName(input.name ?? null);
|
|
28
|
+
const emailLocalPart = input.email
|
|
29
|
+
?.split("@")[0]
|
|
30
|
+
?.replace(/[._-]+/g, " ")
|
|
31
|
+
.trim();
|
|
32
|
+
const firstName = toNullableTrimmed(input.firstName) ?? split.firstName ?? emailLocalPart ?? "Customer";
|
|
33
|
+
const lastName = toNullableTrimmed(input.lastName) ?? split.lastName ?? "Guest";
|
|
34
|
+
return { firstName, lastName };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Returns the first person whose normalized contact point matches
|
|
38
|
+
* `(kind, value)`. Email and website are normalized to lowercase; phone
|
|
39
|
+
* is trimmed. Returns `null` when no match exists, the value resolves to
|
|
40
|
+
* an empty string, or the matching contact point is attached to a
|
|
41
|
+
* non-person entity (organizations share the same table).
|
|
42
|
+
*/
|
|
43
|
+
export async function findPersonByContactPoint(db, query) {
|
|
44
|
+
const value = toNullableTrimmed(query.value);
|
|
45
|
+
if (!value)
|
|
46
|
+
return null;
|
|
47
|
+
const normalized = normalizeContactValue(query.kind, value);
|
|
48
|
+
const [row] = await db
|
|
49
|
+
.select({ personId: identityContactPoints.entityId })
|
|
50
|
+
.from(identityContactPoints)
|
|
51
|
+
.where(and(eq(identityContactPoints.entityType, personEntityType), eq(identityContactPoints.kind, query.kind), eq(identityContactPoints.normalizedValue, normalized)))
|
|
52
|
+
.limit(1);
|
|
53
|
+
if (!row)
|
|
54
|
+
return null;
|
|
55
|
+
return peopleAccountsService.getPersonById(db, row.personId);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Finds an existing CRM person by normalized email (then phone as a
|
|
59
|
+
* fallback) or creates a new one from the supplied contact snapshot.
|
|
60
|
+
* Used by booking session bootstrap + confirm flows so storefront
|
|
61
|
+
* bookings produce a real CRM record without each consumer reinventing
|
|
62
|
+
* the dedupe key. The created row carries the supplied `source` /
|
|
63
|
+
* `sourceRef` so the audit trail mirrors lead/newsletter signals.
|
|
64
|
+
*
|
|
65
|
+
* Lookup order: email → phone. The first hit wins; ties never happen
|
|
66
|
+
* because identity contact points are unique per `(kind, normalized)`
|
|
67
|
+
* for a given entity but consumers can re-use the same email across
|
|
68
|
+
* people via the unique-by-person sync logic. In that case the first
|
|
69
|
+
* person we see is returned — callers that need stricter ownership
|
|
70
|
+
* semantics should resolve themselves and pass a `personId` directly.
|
|
71
|
+
*/
|
|
72
|
+
export async function upsertPersonFromContact(db, contact, options = {}) {
|
|
73
|
+
const email = toNullableTrimmed(contact.email);
|
|
74
|
+
const phone = toNullableTrimmed(contact.phone);
|
|
75
|
+
if (email) {
|
|
76
|
+
const existing = await findPersonByContactPoint(db, { kind: "email", value: email });
|
|
77
|
+
if (existing)
|
|
78
|
+
return existing;
|
|
79
|
+
}
|
|
80
|
+
if (phone) {
|
|
81
|
+
const existing = await findPersonByContactPoint(db, { kind: "phone", value: phone });
|
|
82
|
+
if (existing)
|
|
83
|
+
return existing;
|
|
84
|
+
}
|
|
85
|
+
// No match — create a new person. `personNameFromContact` ensures
|
|
86
|
+
// first/last name are populated even when only an email is on file.
|
|
87
|
+
const { firstName, lastName } = personNameFromContact(contact);
|
|
88
|
+
return peopleAccountsService.createPerson(db, {
|
|
89
|
+
firstName,
|
|
90
|
+
lastName,
|
|
91
|
+
email,
|
|
92
|
+
phone,
|
|
93
|
+
website: null,
|
|
94
|
+
status: options.status ?? "active",
|
|
95
|
+
source: options.source ?? null,
|
|
96
|
+
sourceRef: options.sourceRef ?? null,
|
|
97
|
+
preferredLanguage: toNullableTrimmed(contact.preferredLanguage),
|
|
98
|
+
tags: options.tags ?? [],
|
|
99
|
+
});
|
|
100
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { findPersonByContactPoint, personNameFromContact, upsertPersonFromContact } from "./accounts-resolve.js";
|
|
1
2
|
export declare const accountsService: {
|
|
3
|
+
findPersonByContactPoint: typeof findPersonByContactPoint;
|
|
4
|
+
upsertPersonFromContact: typeof upsertPersonFromContact;
|
|
2
5
|
listPeople(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").PersonListQuery): Promise<{
|
|
3
6
|
data: ({
|
|
4
7
|
id: string;
|
|
@@ -1401,4 +1404,6 @@ export declare const accountsService: {
|
|
|
1401
1404
|
id: string;
|
|
1402
1405
|
} | null>;
|
|
1403
1406
|
};
|
|
1407
|
+
export type { PersonContactInput, UpsertPersonFromContactOptions, } from "./accounts-resolve.js";
|
|
1408
|
+
export { findPersonByContactPoint, personNameFromContact, upsertPersonFromContact };
|
|
1404
1409
|
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/service/accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/service/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,uBAAuB,CAAA;AAE9B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,YAAY,EACV,kBAAkB,EAClB,8BAA8B,GAC/B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,CAAA"}
|
package/dist/service/accounts.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { organizationAccountsService } from "./accounts-organizations.js";
|
|
2
2
|
import { peopleAccountsService } from "./accounts-people.js";
|
|
3
|
+
import { findPersonByContactPoint, personNameFromContact, upsertPersonFromContact, } from "./accounts-resolve.js";
|
|
3
4
|
export const accountsService = {
|
|
4
5
|
...organizationAccountsService,
|
|
5
6
|
...peopleAccountsService,
|
|
7
|
+
findPersonByContactPoint,
|
|
8
|
+
upsertPersonFromContact,
|
|
6
9
|
};
|
|
10
|
+
export { findPersonByContactPoint, personNameFromContact, upsertPersonFromContact };
|
package/dist/service/index.d.ts
CHANGED
|
@@ -4487,6 +4487,8 @@ export declare const crmService: {
|
|
|
4487
4487
|
deleteStage(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
4488
4488
|
id: string;
|
|
4489
4489
|
} | null>;
|
|
4490
|
+
findPersonByContactPoint: typeof import("./accounts-resolve.js").findPersonByContactPoint;
|
|
4491
|
+
upsertPersonFromContact: typeof import("./accounts-resolve.js").upsertPersonFromContact;
|
|
4490
4492
|
listPeople(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").PersonListQuery): Promise<{
|
|
4491
4493
|
data: ({
|
|
4492
4494
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"drizzle-orm": "^0.45.2",
|
|
40
40
|
"hono": "^4.12.10",
|
|
41
41
|
"zod": "^4.3.6",
|
|
42
|
-
"@voyantjs/core": "0.
|
|
43
|
-
"@voyantjs/db": "0.
|
|
44
|
-
"@voyantjs/hono": "0.
|
|
45
|
-
"@voyantjs/identity": "0.
|
|
46
|
-
"@voyantjs/utils": "0.
|
|
42
|
+
"@voyantjs/core": "0.53.0",
|
|
43
|
+
"@voyantjs/db": "0.53.0",
|
|
44
|
+
"@voyantjs/hono": "0.53.0",
|
|
45
|
+
"@voyantjs/identity": "0.53.0",
|
|
46
|
+
"@voyantjs/utils": "0.53.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"typescript": "^6.0.2",
|