@rubytech/create-maxy 1.0.771 → 1.0.773
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/package.json +1 -1
- package/payload/platform/plugins/admin/PLUGIN.md +2 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js +131 -20
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +5 -6
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +5 -6
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +21 -6
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +3 -2
- package/payload/server/{chunk-TKYZ7AEB.js → chunk-2HBD6IRL.js} +105 -5
- package/payload/server/{chunk-IO2WQEY4.js → chunk-PIMJJCOQ.js} +2 -1
- package/payload/server/{client-pool-5V5GX3UT.js → client-pool-U3A5YUO7.js} +1 -1
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/public/assets/{admin-CaXX8wc3.js → admin-C4CTVtBu.js} +6 -6
- package/payload/server/public/index.html +1 -1
- package/payload/server/server.js +81 -15
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts +0 -61
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts.map +0 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js +0 -266
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts +0 -2
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js +0 -293
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js +0 -88
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts +0 -80
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js +0 -355
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js +0 -34
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js +0 -24
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts +0 -6
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js +0 -35
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts +0 -4
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js +0 -60
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js +0 -39
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js +0 -125
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js +0 -87
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js +0 -82
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts +0 -12
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js +0 -49
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js +0 -85
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js +0 -44
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js +0 -25
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js.map +0 -1
- package/payload/server/chunk-26QT2HEQ.js +0 -9483
- package/payload/server/chunk-2T4RRIJK.js +0 -9462
- package/payload/server/chunk-2W7O63CK.js +0 -3052
- package/payload/server/chunk-32ZHQJNX.js +0 -11395
- package/payload/server/chunk-3KDVGWPQ.js +0 -2920
- package/payload/server/chunk-3RBKKDHC.js +0 -783
- package/payload/server/chunk-3VVHVJK2.js +0 -11405
- package/payload/server/chunk-43JK6WNK.js +0 -3057
- package/payload/server/chunk-5YIXIF6C.js +0 -726
- package/payload/server/chunk-7ODDM7L4.js +0 -12370
- package/payload/server/chunk-A5K3CFMI.js +0 -12297
- package/payload/server/chunk-AIWWYOBH.js +0 -9439
- package/payload/server/chunk-B54KBAK4.js +0 -72
- package/payload/server/chunk-BIOIXN5A.js +0 -12165
- package/payload/server/chunk-D53LK5YC.js +0 -12171
- package/payload/server/chunk-EIQT6QDH.js +0 -9562
- package/payload/server/chunk-FM5JMRED.js +0 -12033
- package/payload/server/chunk-HPU24BXP.js +0 -12173
- package/payload/server/chunk-HU5FSQYA.js +0 -12186
- package/payload/server/chunk-IAIGB5WN.js +0 -11406
- package/payload/server/chunk-JDT3MGUY.js +0 -12165
- package/payload/server/chunk-JLVVVQN7.js +0 -9447
- package/payload/server/chunk-K7GQ5RMN.js +0 -12172
- package/payload/server/chunk-LQ5GSMEW.js +0 -12036
- package/payload/server/chunk-MPWGVFU2.js +0 -12340
- package/payload/server/chunk-O2FWENOD.js +0 -11530
- package/payload/server/chunk-PE76FPYP.js +0 -12040
- package/payload/server/chunk-PQ6LDXZ4.js +0 -2997
- package/payload/server/chunk-Q6NDXCM6.js +0 -11448
- package/payload/server/chunk-QXAUMZXQ.js +0 -9512
- package/payload/server/chunk-S3M2NZMA.js +0 -3136
- package/payload/server/chunk-SGBNY4NP.js +0 -9540
- package/payload/server/chunk-SKXO42T6.js +0 -2934
- package/payload/server/chunk-SPTD7L7Z.js +0 -9474
- package/payload/server/chunk-TXPEEAV6.js +0 -2997
- package/payload/server/chunk-U3W5YIXU.js +0 -11450
- package/payload/server/chunk-U5JPRUYZ.js +0 -12298
- package/payload/server/chunk-UFLV7I6N.js +0 -11678
- package/payload/server/chunk-ULVR2RRY.js +0 -9439
- package/payload/server/chunk-VOD2IZ6J.js +0 -2934
- package/payload/server/chunk-VS7CRH4M.js +0 -9439
- package/payload/server/chunk-W6ZUNLLS.js +0 -9446
- package/payload/server/chunk-WW464F23.js +0 -9512
- package/payload/server/chunk-Y57ACANQ.js +0 -12292
- package/payload/server/chunk-ZK3VNR7Y.js +0 -9510
- package/payload/server/chunk-ZL2A4ROK.js +0 -11416
- package/payload/server/client-pool-67NUIL7H.js +0 -28
- package/payload/server/client-pool-CX2MFW75.js +0 -28
- package/payload/server/client-pool-DQBHSKAF.js +0 -28
- package/payload/server/client-pool-I5TCP7WI.js +0 -28
- package/payload/server/client-pool-ISMYJXCU.js +0 -28
- package/payload/server/client-pool-SGPHSYLK.js +0 -28
- package/payload/server/client-pool-TCKGDZLE.js +0 -28
- package/payload/server/client-pool-TULUIO6M.js +0 -28
- package/payload/server/upgrade-progress-server.js +0 -83
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-register.d.ts","sourceRoot":"","sources":["../../src/tools/key-register.ts"],"names":[],"mappings":"AAcA,wBAAsB,WAAW,CAAC,MAAM,EAAE;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,GAAG,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA2EhC"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { getSession } from "../lib/neo4j.js";
|
|
2
|
-
import { encrypt } from "../lib/crypto.js";
|
|
3
|
-
import { loopGet, LoopApiError } from "../lib/loop-api.js";
|
|
4
|
-
const ALL_PERMISSIONS = ["properties", "people", "viewings", "feedback", "team", "marketing", "customer", "supplier"];
|
|
5
|
-
export async function keyRegister(params) {
|
|
6
|
-
const { teamName, apiKey, accountId } = params;
|
|
7
|
-
const permissions = params.permissions ?? ALL_PERMISSIONS;
|
|
8
|
-
// Validate key against Loop API — try /team endpoint
|
|
9
|
-
let teamAddress = "";
|
|
10
|
-
let agentId = "";
|
|
11
|
-
let warning;
|
|
12
|
-
try {
|
|
13
|
-
const teamData = await loopGet(apiKey, "/team", "loop-key-register", teamName);
|
|
14
|
-
if (Array.isArray(teamData) && teamData.length === 0) {
|
|
15
|
-
// 204 was converted to empty array — ambiguous scope
|
|
16
|
-
warning =
|
|
17
|
-
"Key accepted but Loop returned no team data (204). " +
|
|
18
|
-
"Verify the key's scope in Loop's dashboard.";
|
|
19
|
-
}
|
|
20
|
-
else if (teamData && typeof teamData === "object") {
|
|
21
|
-
teamAddress = String(teamData.address ?? "");
|
|
22
|
-
agentId = String(teamData.agentId ?? teamData.id ?? "");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
catch (err) {
|
|
26
|
-
if (err instanceof LoopApiError && err.status === 401) {
|
|
27
|
-
throw new Error(`Loop API rejected the key for team "${teamName}" (HTTP 401). ` +
|
|
28
|
-
`Check that the key is valid and not expired.`);
|
|
29
|
-
}
|
|
30
|
-
// Network/timeout errors — still reject, key is unverified
|
|
31
|
-
throw new Error(`Could not validate key against Loop API: ${err instanceof Error ? err.message : String(err)}`);
|
|
32
|
-
}
|
|
33
|
-
// Encrypt and store
|
|
34
|
-
const encryptedKey = encrypt(apiKey);
|
|
35
|
-
const now = new Date().toISOString();
|
|
36
|
-
const writeSession = getSession();
|
|
37
|
-
try {
|
|
38
|
-
await writeSession.run(`CREATE INDEX loop_team_key_account_team IF NOT EXISTS
|
|
39
|
-
FOR (k:LoopTeamKey) ON (k.accountId, k.teamName)`, {});
|
|
40
|
-
const mergeResult = await writeSession.run(`MERGE (k:LoopTeamKey {teamName: $teamName, accountId: $accountId})
|
|
41
|
-
ON CREATE SET
|
|
42
|
-
k.encryptedKey = $encryptedKey,
|
|
43
|
-
k.teamAddress = $teamAddress,
|
|
44
|
-
k.agentId = $agentId,
|
|
45
|
-
k.permissions = $permissions,
|
|
46
|
-
k.createdAt = $now,
|
|
47
|
-
k.updatedAt = $now
|
|
48
|
-
RETURN k.createdAt = $now AS created`, { teamName, encryptedKey, teamAddress, agentId, accountId, permissions, now });
|
|
49
|
-
const created = mergeResult.records[0]?.get("created");
|
|
50
|
-
if (!created) {
|
|
51
|
-
throw new Error(`Team "${teamName}" is already registered for this account.`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
await writeSession.close();
|
|
56
|
-
}
|
|
57
|
-
console.error(`[loop] key-register team=${teamName} account=${accountId}`);
|
|
58
|
-
return { warning };
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=key-register.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-register.js","sourceRoot":"","sources":["../../src/tools/key-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAU3D,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,U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,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAC/F,CAAC;IACJ,CAAC;IAED,oBAAoB;IACpB,MAAM,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAErC,MAAM,YAAY,GAAG,UAAU,EAAE,CAAC;IAClC,IAAI,CAAC;QACH,MAAM,YAAY,CAAC,GAAG,CACpB;wDACkD,EAClD,EAAE,CACH,CAAC;QAEF,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,GAAG,CACxC;;;;;;;;4CAQsC,EACtC,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAC9E,CAAC;QAEF,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,SAAS,QAAQ,2CAA2C,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,4BAA4B,QAAQ,YAAY,SAAS,EAAE,CAAC,CAAC;IAE3E,OAAO,EAAE,OAAO,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type EnquiryAction = "seller-enquiry" | "autoresponder-get" | "autoresponder-answers" | "autoresponder-details" | "autoresponder-refer";
|
|
2
|
-
export declare function marketingEnquiry(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
teamName: string;
|
|
5
|
-
action: EnquiryAction;
|
|
6
|
-
sellerEnquiryData?: Record<string, unknown>;
|
|
7
|
-
autoResponderId?: number;
|
|
8
|
-
autoResponderKey?: string;
|
|
9
|
-
answers?: unknown[];
|
|
10
|
-
details?: Record<string, unknown>;
|
|
11
|
-
}): Promise<string>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=marketing-enquiry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-enquiry.d.ts","sourceRoot":"","sources":["../../src/tools/marketing-enquiry.ts"],"names":[],"mappings":"AAEA,KAAK,aAAa,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,uBAAuB,GAAG,uBAAuB,GAAG,qBAAqB,CAAC;AAsBxI,wBAAsB,gBAAgB,CAAC,MAAM,EAAE;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;IAEtB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,GAAG,OAAO,CAAC,MAAM,CAAC,CA2ElB"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { loopGet, loopPost, loopPut, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
-
export async function marketingEnquiry(params) {
|
|
3
|
-
const { accountId, teamName, action } = params;
|
|
4
|
-
if (action === "seller-enquiry") {
|
|
5
|
-
await withTeamKey(accountId, teamName, "marketing", "loop-marketing-enquiry", async (apiKey) => {
|
|
6
|
-
return loopPost(apiKey, "/marketing/enquiries/seller", params.sellerEnquiryData ?? {}, "loop-marketing-enquiry", teamName);
|
|
7
|
-
});
|
|
8
|
-
return `Seller enquiry submitted via team "${teamName}".`;
|
|
9
|
-
}
|
|
10
|
-
if (!params.autoResponderId || !params.autoResponderKey) {
|
|
11
|
-
throw new Error("autoResponderId and autoResponderKey are required for autoresponder actions.");
|
|
12
|
-
}
|
|
13
|
-
const id = params.autoResponderId;
|
|
14
|
-
const key = params.autoResponderKey;
|
|
15
|
-
if (action === "autoresponder-get") {
|
|
16
|
-
const result = await withTeamKey(accountId, teamName, "marketing", "loop-marketing-enquiry", async (apiKey) => {
|
|
17
|
-
return loopGet(apiKey, `/marketing/enquiries/auto-responder/${id}/${key}`, "loop-marketing-enquiry", teamName);
|
|
18
|
-
});
|
|
19
|
-
return JSON.stringify(result, null, 2);
|
|
20
|
-
}
|
|
21
|
-
if (action === "autoresponder-answers") {
|
|
22
|
-
await withTeamKey(accountId, teamName, "marketing", "loop-marketing-enquiry", async (apiKey) => {
|
|
23
|
-
return loopPut(apiKey, `/marketing/enquiries/auto-responder/${id}/answers/${key}`, params.answers ?? [], "loop-marketing-enquiry", teamName);
|
|
24
|
-
});
|
|
25
|
-
return `Auto-responder answers submitted for enquiry ${id} via team "${teamName}".`;
|
|
26
|
-
}
|
|
27
|
-
if (action === "autoresponder-details") {
|
|
28
|
-
await withTeamKey(accountId, teamName, "marketing", "loop-marketing-enquiry", async (apiKey) => {
|
|
29
|
-
return loopPut(apiKey, `/marketing/enquiries/auto-responder/${id}/details/${key}`, params.details ?? {}, "loop-marketing-enquiry", teamName);
|
|
30
|
-
});
|
|
31
|
-
return `Auto-responder details updated for enquiry ${id} via team "${teamName}".`;
|
|
32
|
-
}
|
|
33
|
-
if (action === "autoresponder-refer") {
|
|
34
|
-
await withTeamKey(accountId, teamName, "marketing", "loop-marketing-enquiry", async (apiKey) => {
|
|
35
|
-
return loopPut(apiKey, `/marketing/enquiries/auto-responder/${id}/refer/${key}`, {}, "loop-marketing-enquiry", teamName);
|
|
36
|
-
});
|
|
37
|
-
return `Enquiry ${id} referred via team "${teamName}".`;
|
|
38
|
-
}
|
|
39
|
-
throw new Error(`Unknown action: ${action}`);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=marketing-enquiry.js.map
|
|
@@ -1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AC;AAC/C,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type Department = "sales" | "lettings";
|
|
2
|
-
export declare function marketingMatchBatch(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
propertyIds: number[];
|
|
5
|
-
department: Department;
|
|
6
|
-
teamName?: string;
|
|
7
|
-
}): Promise<string>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=marketing-match-batch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match-batch.d.ts","sourceRoot":"","sources":["../../src/tools/marketing-match-batch.ts"],"names":[],"mappings":"AAoBA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AAEvC,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBlB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopPut, } from "../lib/loop-api.js";
|
|
2
|
-
export async function marketingMatchBatch(params) {
|
|
3
|
-
const { accountId, propertyIds, department, teamName } = params;
|
|
4
|
-
const result = await aggregateAcrossTeams(accountId, "marketing", "loop-marketing-match-batch", async (apiKey, team) => {
|
|
5
|
-
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
6
|
-
const path = `${prefix}/matching/other-matches`;
|
|
7
|
-
const data = await loopPut(apiKey, path, propertyIds, "loop-marketing-match-batch", team);
|
|
8
|
-
return Array.isArray(data) ? data : [];
|
|
9
|
-
}, { teamName });
|
|
10
|
-
return formatAggregationResult(result, (p) => {
|
|
11
|
-
const price = p.price ? ` — £${p.price.toLocaleString("en-GB")}` : "";
|
|
12
|
-
const beds = p.bedrooms ? ` ${p.bedrooms}bed` : "";
|
|
13
|
-
return `- ${p.address ?? "Unknown"}${price}${beds}`;
|
|
14
|
-
}, "matching properties");
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=marketing-match-batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match-batch.js","sourceRoot":"","sources":["../../src/tools/marketing-match-batch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAkB5B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAKzC;IACC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEhE,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,EACT,WAAW,EACX,4BAA4B,EAC5B,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,MAAM,GAAG,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC;QAC/E,MAAM,IAAI,GAAG,GAAG,MAAM,yBAAyB,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAwB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,4BAA4B,EAAE,IAAI,CAAC,CAAC;QACjH,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC,EACD,EAAE,QAAQ,EAAE,CACb,CAAC;IAEF,OAAO,uBAAuB,CAC5B,MAAM,EACN,CAAC,CAAC,EAAE,EAAE;QACJ,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,SAAS,GAAG,KAAK,GAAG,IAAI,EAAE,CAAC;IACtD,CAAC,EACD,qBAAqB,CACtB,CAAC;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type Department = "sales" | "lettings";
|
|
2
|
-
type MatchAction = "viewing" | "information" | "callback";
|
|
3
|
-
export declare function marketingMatchRequest(params: {
|
|
4
|
-
accountId: string;
|
|
5
|
-
teamName: string;
|
|
6
|
-
propertyId: number;
|
|
7
|
-
department: Department;
|
|
8
|
-
action: MatchAction;
|
|
9
|
-
name?: string;
|
|
10
|
-
email?: string;
|
|
11
|
-
phone?: string;
|
|
12
|
-
message?: string;
|
|
13
|
-
}): Promise<string>;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=marketing-match-request.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match-request.d.ts","sourceRoot":"","sources":["../../src/tools/marketing-match-request.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AACvC,KAAK,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAY1D,wBAAsB,qBAAqB,CAAC,MAAM,EAAE;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBlB"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { loopPost, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
-
export async function marketingMatchRequest(params) {
|
|
3
|
-
const { accountId, teamName, propertyId, department, action, ...body } = params;
|
|
4
|
-
await withTeamKey(accountId, teamName, "marketing", "loop-marketing-match-request", async (apiKey) => {
|
|
5
|
-
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
6
|
-
const path = `${prefix}/matching/${propertyId}/${action}`;
|
|
7
|
-
return loopPost(apiKey, path, body, "loop-marketing-match-request", teamName);
|
|
8
|
-
});
|
|
9
|
-
return `${action} request submitted for matching property ${propertyId} (${department}) via team "${teamName}".`;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=marketing-match-request.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match-request.js","sourceRoot":"","sources":["../../src/tools/marketing-match-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAe3D,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,MAU3C;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IAEhF,MAAM,WAAW,CACf,SAAS,EACT,QAAQ,EACR,WAAW,EACX,8BAA8B,EAC9B,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,MAAM,GAAG,UAAU,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC;QAC/E,MAAM,IAAI,GAAG,GAAG,MAAM,aAAa,UAAU,IAAI,MAAM,EAAE,CAAC;QAC1D,OAAO,QAAQ,CAAsB,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,8BAA8B,EAAE,QAAQ,CAAC,CAAC;IACrG,CAAC,CACF,CAAC;IAEF,OAAO,GAAG,MAAM,4CAA4C,UAAU,KAAK,UAAU,eAAe,QAAQ,IAAI,CAAC;AACnH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type Department = "sales" | "lettings";
|
|
2
|
-
export declare function marketingMatchDetail(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
propertyId: number;
|
|
5
|
-
department: Department;
|
|
6
|
-
includeTeamProfile?: boolean;
|
|
7
|
-
teamName?: string;
|
|
8
|
-
}): Promise<string>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=marketing-match.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match.d.ts","sourceRoot":"","sources":["../../src/tools/marketing-match.ts"],"names":[],"mappings":"AAgCA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AAEvC,wBAAsB,oBAAoB,CAAC,MAAM,EAAE;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2ClB"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
|
|
2
|
-
export async function marketingMatchDetail(params) {
|
|
3
|
-
const { accountId, propertyId, department, includeTeamProfile = false, teamName } = params;
|
|
4
|
-
const result = await aggregateAcrossTeams(accountId, "marketing", "loop-marketing-match", async (apiKey, team) => {
|
|
5
|
-
const prefix = department === "lettings" ? "/marketing/rentals" : "/marketing";
|
|
6
|
-
const path = `${prefix}/matching/${propertyId}`;
|
|
7
|
-
const data = await loopGet(apiKey, path, "loop-marketing-match", team);
|
|
8
|
-
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
9
|
-
if (includeTeamProfile) {
|
|
10
|
-
const profilePath = `${prefix}/matching/${propertyId}/team-profile`;
|
|
11
|
-
const profile = await loopGet(apiKey, profilePath, "loop-marketing-match", team).catch(() => null);
|
|
12
|
-
if (profile) {
|
|
13
|
-
data._teamProfile = profile;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return [data];
|
|
17
|
-
}
|
|
18
|
-
return [];
|
|
19
|
-
}, { teamName });
|
|
20
|
-
return formatAggregationResult(result, (p) => {
|
|
21
|
-
const lines = [`**${p.address ?? "Unknown address"}**`];
|
|
22
|
-
if (p.price)
|
|
23
|
-
lines.push(`Price: £${p.price.toLocaleString("en-GB")}`);
|
|
24
|
-
if (p.type)
|
|
25
|
-
lines.push(`Type: ${p.type}`);
|
|
26
|
-
if (p.bedrooms)
|
|
27
|
-
lines.push(`Bedrooms: ${p.bedrooms}`);
|
|
28
|
-
if (p.status)
|
|
29
|
-
lines.push(`Status: ${p.status}`);
|
|
30
|
-
if (p.description)
|
|
31
|
-
lines.push(`\n${p.description}`);
|
|
32
|
-
const profile = p._teamProfile;
|
|
33
|
-
if (profile) {
|
|
34
|
-
lines.push(`\n**Team:** ${profile.name ?? ""} — ${profile.address ?? ""} | ${profile.phone ?? ""} | ${profile.email ?? ""}`);
|
|
35
|
-
}
|
|
36
|
-
return lines.join("\n");
|
|
37
|
-
}, "matching property details");
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=marketing-match.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"marketing-match.js","sourceRoot":"","sources":["../../src/tools/marketing-match.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AA8B5B,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAM1C;IACC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,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CAAC,CAAC;QACtE,IAAI,CAAC,CAAC,IAAI;YAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,CAAC,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtD,IAAI,CAAC,CAAC,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QACpD,MAAM,OAAO,GAAI,CAA6B,CAAC,YAAmD,CAAC;QACnG,IAAI,OAAO,EAAE,CAAC;YACZ,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,IAAI,EAAE,MAAM,OAAO,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/H,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC,EACD,2BAA2B,CAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type PeopleRole = "buyers" | "sellers" | "renters" | "landlords";
|
|
2
|
-
export declare function peopleDetail(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
personId: number;
|
|
5
|
-
role?: PeopleRole;
|
|
6
|
-
teamName?: string;
|
|
7
|
-
}): Promise<string>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=people-detail.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"people-detail.d.ts","sourceRoot":"","sources":["../../src/tools/people-detail.ts"],"names":[],"mappings":"AAkHA,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBlB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
|
|
2
|
-
export async function peopleDetail(params) {
|
|
3
|
-
const { accountId, personId, role, teamName } = params;
|
|
4
|
-
const result = await aggregateAcrossTeams(accountId, "people", "loop-people-detail", async (apiKey, team) => {
|
|
5
|
-
const basePath = role ? `/people/${role}` : "/people";
|
|
6
|
-
const path = `${basePath}/${personId}`;
|
|
7
|
-
const data = await loopGet(apiKey, path, "loop-people-detail", team);
|
|
8
|
-
if (data && typeof data === "object" && !Array.isArray(data)) {
|
|
9
|
-
return [data];
|
|
10
|
-
}
|
|
11
|
-
return [];
|
|
12
|
-
}, { teamName });
|
|
13
|
-
return formatAggregationResult(result, (record) => formatDetailRecord(record, role), "person details");
|
|
14
|
-
}
|
|
15
|
-
function formatDetailRecord(record, role) {
|
|
16
|
-
if (role === "buyers") {
|
|
17
|
-
const p = record;
|
|
18
|
-
const lines = [`**${p.buyerGroupName ?? "Unknown"}** [ID: ${p.id}]`];
|
|
19
|
-
if (p.maxPrice != null)
|
|
20
|
-
lines.push(`Max price: £${p.maxPrice.toLocaleString("en-GB")}`);
|
|
21
|
-
if (p.minBeds)
|
|
22
|
-
lines.push(`Min beds: ${p.minBeds}`);
|
|
23
|
-
if (p.position && p.position !== "none")
|
|
24
|
-
lines.push(`Position: ${p.position}`);
|
|
25
|
-
if (p.sellingPosition)
|
|
26
|
-
lines.push(`Selling position: ${p.sellingPosition}`);
|
|
27
|
-
if (p.purchaseReason)
|
|
28
|
-
lines.push(`Purchase reason: ${p.purchaseReason}`);
|
|
29
|
-
if (p.financiallyVerified)
|
|
30
|
-
lines.push(`Financially verified: ${p.financiallyVerified}`);
|
|
31
|
-
if (p.mortgageOffered)
|
|
32
|
-
lines.push(`Mortgage: ${p.mortgageOffered}`);
|
|
33
|
-
if (p.requirementNotes)
|
|
34
|
-
lines.push(`Requirements: ${p.requirementNotes}`);
|
|
35
|
-
if (p.propertyTypes?.length)
|
|
36
|
-
lines.push(`Property types: ${p.propertyTypes.join(", ")}`);
|
|
37
|
-
if (p.searchAreas?.length)
|
|
38
|
-
lines.push(`Search areas: ${p.searchAreas.join(", ")}`);
|
|
39
|
-
if (p.viewings?.length)
|
|
40
|
-
lines.push(`Viewings: ${p.viewings.length}`);
|
|
41
|
-
if (p.offers?.length)
|
|
42
|
-
lines.push(`Offers: ${p.offers.length}`);
|
|
43
|
-
if (p.people?.length) {
|
|
44
|
-
lines.push(`\n**Contacts (${p.people.length}):**`);
|
|
45
|
-
for (const person of p.people) {
|
|
46
|
-
const name = [person.firstName, person.lastName].filter(Boolean).join(" ");
|
|
47
|
-
const phone = person.primaryPhone ?? "";
|
|
48
|
-
const email = person.primaryEmail ?? "";
|
|
49
|
-
const contact = [phone, email].filter(Boolean).join(" | ");
|
|
50
|
-
lines.push(` - ${name} [ID: ${person.id}]${contact ? ` — ${contact}` : ""}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return lines.join("\n");
|
|
54
|
-
}
|
|
55
|
-
if (role === "sellers" || role === "landlords") {
|
|
56
|
-
const p = record;
|
|
57
|
-
const lines = [`**${p.sellerGroupName ?? "Unknown"}** [ID: ${p.id}]`];
|
|
58
|
-
if (p.property) {
|
|
59
|
-
const prop = p.property;
|
|
60
|
-
if (prop.propertyAddress)
|
|
61
|
-
lines.push(`Property: ${prop.propertyAddress}`);
|
|
62
|
-
if (prop.price != null)
|
|
63
|
-
lines.push(`Price: £${Number(prop.price).toLocaleString("en-GB")}`);
|
|
64
|
-
if (prop.status)
|
|
65
|
-
lines.push(`Status: ${prop.status}`);
|
|
66
|
-
if (prop.propertyType)
|
|
67
|
-
lines.push(`Type: ${prop.propertyType}`);
|
|
68
|
-
if (prop.propertyId || prop.id)
|
|
69
|
-
lines.push(`Property ID: ${prop.propertyId ?? prop.id}`);
|
|
70
|
-
}
|
|
71
|
-
if (p.people?.length) {
|
|
72
|
-
lines.push(`\n**Contacts (${p.people.length}):**`);
|
|
73
|
-
for (const person of p.people) {
|
|
74
|
-
const name = [person.firstName, person.lastName].filter(Boolean).join(" ");
|
|
75
|
-
const phone = person.primaryPhone ?? "";
|
|
76
|
-
const email = person.primaryEmail ?? "";
|
|
77
|
-
const contact = [phone, email].filter(Boolean).join(" | ");
|
|
78
|
-
lines.push(` - ${name} [ID: ${person.id}]${contact ? ` — ${contact}` : ""}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return lines.join("\n");
|
|
82
|
-
}
|
|
83
|
-
// Generic /people/{id} — PersonDetail schema
|
|
84
|
-
const p = record;
|
|
85
|
-
const title = p.title?.trim() ? `${p.title.trim()} ` : "";
|
|
86
|
-
const name = [p.firstName, p.lastName].filter(Boolean).join(" ") || "Unknown";
|
|
87
|
-
const lines = [`**${title}${name}** [ID: ${p.id}]`];
|
|
88
|
-
if (p.primaryEmail)
|
|
89
|
-
lines.push(`Email: ${p.primaryEmail}`);
|
|
90
|
-
if (p.primaryPhone)
|
|
91
|
-
lines.push(`Phone: ${p.primaryPhone}`);
|
|
92
|
-
if (p.dateCreated)
|
|
93
|
-
lines.push(`Created: ${p.dateCreated.split("T")[0]}`);
|
|
94
|
-
// Build address from components
|
|
95
|
-
const addrParts = [
|
|
96
|
-
p.houseSecondaryNameOrNumber,
|
|
97
|
-
p.houseNameOrNumber,
|
|
98
|
-
p.street,
|
|
99
|
-
p.locality,
|
|
100
|
-
p.town,
|
|
101
|
-
p.postcode,
|
|
102
|
-
].filter(Boolean);
|
|
103
|
-
if (addrParts.length)
|
|
104
|
-
lines.push(`Address: ${addrParts.join(", ")}`);
|
|
105
|
-
if (p.contactNotes)
|
|
106
|
-
lines.push(`Notes: ${p.contactNotes}`);
|
|
107
|
-
if (p.buyerProfiles?.length) {
|
|
108
|
-
lines.push(`\n**Buyer profiles (${p.buyerProfiles.length}):**`);
|
|
109
|
-
for (const bp of p.buyerProfiles) {
|
|
110
|
-
const bpName = bp.buyerGroupName ?? `Buyer ${bp.id}`;
|
|
111
|
-
const price = bp.maxPrice != null ? ` max £${bp.maxPrice.toLocaleString("en-GB")}` : "";
|
|
112
|
-
lines.push(` - ${bpName} [ID: ${bp.id}]${price}`);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (p.sellerProfiles?.length) {
|
|
116
|
-
lines.push(`\n**Seller profiles (${p.sellerProfiles.length}):**`);
|
|
117
|
-
for (const sp of p.sellerProfiles) {
|
|
118
|
-
const spName = sp.sellerGroupName ?? `Seller ${sp.id}`;
|
|
119
|
-
const addr = sp.propertyAddress ? ` — ${sp.propertyAddress}` : "";
|
|
120
|
-
lines.push(` - ${spName} [ID: ${sp.id}]${addr}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return lines.join("\n");
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=people-detail.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"people-detail.js","sourceRoot":"","sources":["../../src/tools/people-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAgH5B,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAKlC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IAEvD,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,E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C,CAAC;QACpD,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"people-list.d.ts","sourceRoot":"","sources":["../../src/tools/people-list.ts"],"names":[],"mappings":"AAgBA,wBAAsB,UAAU,CAAC,MAAM,EAAE;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CA8BlB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
|
|
2
|
-
export async function peopleList(params) {
|
|
3
|
-
const { accountId, search, teamName, limit } = params;
|
|
4
|
-
const result = await aggregateAcrossTeams(accountId, "people", "loop-people-list", async (apiKey, team) => {
|
|
5
|
-
const searchParam = search ? `?search=${encodeURIComponent(search)}` : "";
|
|
6
|
-
const data = await loopGet(apiKey, `/people${searchParam}`, "loop-people-list", team);
|
|
7
|
-
return Array.isArray(data) ? data : [];
|
|
8
|
-
}, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
|
|
9
|
-
return formatAggregationResult(result, (p) => {
|
|
10
|
-
const name = [p.firstName, p.lastName].filter(Boolean).join(" ") || "Unknown";
|
|
11
|
-
const contact = p.email ?? p.phone ?? "";
|
|
12
|
-
const type = p.type ? ` (${p.type})` : "";
|
|
13
|
-
return `- ${name}${contact ? ` <${contact}>` : ""}${type}`;
|
|
14
|
-
}, "people");
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=people-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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AG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IAC7D,CAAC,EACD,QAAQ,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
type PeopleRole = "buyers" | "sellers" | "renters" | "landlords";
|
|
2
|
-
export declare function peopleSearch(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
role?: PeopleRole;
|
|
5
|
-
searchTerm?: string;
|
|
6
|
-
maxPrice?: number;
|
|
7
|
-
minBeds?: number;
|
|
8
|
-
searchAreas?: string;
|
|
9
|
-
propertyTypes?: string;
|
|
10
|
-
startDate?: string;
|
|
11
|
-
endDate?: string;
|
|
12
|
-
minPrice?: number;
|
|
13
|
-
maxRent?: number;
|
|
14
|
-
teamName?: string;
|
|
15
|
-
limit?: number;
|
|
16
|
-
}): Promise<string>;
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=people-search.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"people-search.d.ts","sourceRoot":"","sources":["../../src/tools/people-search.ts"],"names":[],"mappings":"AAwEA,KAAK,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEjE,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsDlB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
|
|
2
|
-
export async function peopleSearch(params) {
|
|
3
|
-
const { accountId, role, searchTerm, maxPrice, minBeds, searchAreas, propertyTypes, startDate, endDate, minPrice, maxRent, teamName, limit, } = params;
|
|
4
|
-
// Role-specific endpoints return different schemas — use a generic record
|
|
5
|
-
// type for aggregation, then cast per-role in the formatter.
|
|
6
|
-
const result = await aggregateAcrossTeams(accountId, "people", "loop-people-search", async (apiKey, team) => {
|
|
7
|
-
const qp = [];
|
|
8
|
-
if (searchTerm)
|
|
9
|
-
qp.push(`SearchTerm=${encodeURIComponent(searchTerm)}`);
|
|
10
|
-
if (role === "buyers") {
|
|
11
|
-
if (maxPrice != null)
|
|
12
|
-
qp.push(`MaxPrice=${maxPrice}`);
|
|
13
|
-
if (minBeds != null)
|
|
14
|
-
qp.push(`MinBeds=${minBeds}`);
|
|
15
|
-
if (searchAreas)
|
|
16
|
-
qp.push(`SearchAreas=${encodeURIComponent(searchAreas)}`);
|
|
17
|
-
if (propertyTypes)
|
|
18
|
-
qp.push(`PropertyTypes=${encodeURIComponent(propertyTypes)}`);
|
|
19
|
-
}
|
|
20
|
-
else if (role === "sellers" || role === "landlords") {
|
|
21
|
-
if (startDate)
|
|
22
|
-
qp.push(`StartDate=${encodeURIComponent(startDate)}`);
|
|
23
|
-
if (endDate)
|
|
24
|
-
qp.push(`EndDate=${encodeURIComponent(endDate)}`);
|
|
25
|
-
if (minPrice != null)
|
|
26
|
-
qp.push(`MinPrice=${minPrice}`);
|
|
27
|
-
if (maxPrice != null)
|
|
28
|
-
qp.push(`MaxPrice=${maxPrice}`);
|
|
29
|
-
}
|
|
30
|
-
else if (role === "renters") {
|
|
31
|
-
if (maxRent != null)
|
|
32
|
-
qp.push(`MaxRent=${maxRent}`);
|
|
33
|
-
if (minBeds != null)
|
|
34
|
-
qp.push(`MinBeds=${minBeds}`);
|
|
35
|
-
if (searchAreas)
|
|
36
|
-
qp.push(`SearchAreas=${encodeURIComponent(searchAreas)}`);
|
|
37
|
-
if (propertyTypes)
|
|
38
|
-
qp.push(`PropertyTypes=${encodeURIComponent(propertyTypes)}`);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
// Generic /people endpoint
|
|
42
|
-
if (startDate)
|
|
43
|
-
qp.push(`StartDate=${encodeURIComponent(startDate)}`);
|
|
44
|
-
if (endDate)
|
|
45
|
-
qp.push(`EndDate=${encodeURIComponent(endDate)}`);
|
|
46
|
-
}
|
|
47
|
-
const query = qp.length > 0 ? `?${qp.join("&")}` : "";
|
|
48
|
-
const basePath = role ? `/people/${role}` : "/people";
|
|
49
|
-
const path = `${basePath}${query}`;
|
|
50
|
-
const data = await loopGet(apiKey, path, "loop-people-search", team);
|
|
51
|
-
return Array.isArray(data) ? data : [];
|
|
52
|
-
}, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
|
|
53
|
-
const entityName = role ?? "people";
|
|
54
|
-
return formatAggregationResult(result, (record) => formatPersonRecord(record, role), entityName);
|
|
55
|
-
}
|
|
56
|
-
function formatPersonRecord(record, role) {
|
|
57
|
-
if (role === "buyers") {
|
|
58
|
-
const p = record;
|
|
59
|
-
const name = p.buyerGroupName ?? "Unknown";
|
|
60
|
-
const id = p.id != null ? ` [ID: ${p.id}]` : "";
|
|
61
|
-
const price = p.maxPrice != null ? ` — max £${p.maxPrice.toLocaleString("en-GB")}` : "";
|
|
62
|
-
const beds = p.minBeds ? ` ${p.minBeds}+ beds` : "";
|
|
63
|
-
const position = p.position && p.position !== "none" ? ` (${p.position})` : "";
|
|
64
|
-
const viewings = p.viewingCount ? ` | ${p.viewingCount} viewing${p.viewingCount !== 1 ? "s" : ""}` : "";
|
|
65
|
-
const offers = p.offerCount ? ` | ${p.offerCount} offer${p.offerCount !== 1 ? "s" : ""}` : "";
|
|
66
|
-
return `- ${name}${id}${price}${beds}${position}${viewings}${offers}`;
|
|
67
|
-
}
|
|
68
|
-
if (role === "sellers" || role === "landlords") {
|
|
69
|
-
const p = record;
|
|
70
|
-
const name = p.sellerGroupName ?? "Unknown";
|
|
71
|
-
const id = p.id != null ? ` [ID: ${p.id}]` : "";
|
|
72
|
-
const addr = p.propertyAddress ? ` — ${p.propertyAddress}` : "";
|
|
73
|
-
const price = p.price != null ? ` £${p.price.toLocaleString("en-GB")}` : "";
|
|
74
|
-
const status = p.propertyStatus ? ` [${p.propertyStatus}]` : "";
|
|
75
|
-
const viewings = p.viewingCount ? ` | ${p.viewingCount} viewing${p.viewingCount !== 1 ? "s" : ""}` : "";
|
|
76
|
-
const offers = p.offerCount ? ` | ${p.offerCount} offer${p.offerCount !== 1 ? "s" : ""}` : "";
|
|
77
|
-
return `- ${name}${id}${addr}${price}${status}${viewings}${offers}`;
|
|
78
|
-
}
|
|
79
|
-
// Generic /people or /people/renters — uses PersonSummary schema
|
|
80
|
-
const p = record;
|
|
81
|
-
const name = [p.firstName, p.lastName].filter(Boolean).join(" ") || "Unknown";
|
|
82
|
-
const id = p.id != null ? ` [ID: ${p.id}]` : "";
|
|
83
|
-
const contact = p.primaryEmail ?? p.primaryPhone ?? "";
|
|
84
|
-
const title = p.title?.trim() ? `${p.title.trim()} ` : "";
|
|
85
|
-
return `- ${title}${name}${id}${contact ? ` <${contact}>` : ""}`;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=people-search.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"people-search.js","sourceRoot":"","sources":["../../src/tools/people-search.ts"],"names":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