@wirecat/cli-core 0.649.0 → 0.650.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 +65 -0
- package/dist/analysis/anthropic.js +2 -1
- package/dist/cli/account-remove.d.ts +2 -0
- package/dist/cli/account-remove.js +46 -10
- package/dist/cli/messenger/messages-search-command.js +6 -1
- package/dist/cli/messenger/search-answers.d.ts +3 -1
- package/dist/cli/messenger/search-answers.js +3 -1
- package/dist/cli/steps.js +9 -0
- package/dist/cli/unknown-profile.js +1 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.js +14 -0
- package/dist/crm/cli/index.js +30 -5
- package/dist/crm/source.d.ts +8 -1
- package/dist/crm/stage-tasks.d.ts +3 -1
- package/dist/crm/stage-tasks.js +8 -4
- package/dist/crm/sync.d.ts +1 -1
- package/dist/crm/sync.js +54 -0
- package/dist/domain/crm.d.ts +15 -0
- package/dist/domain/phones.d.ts +2 -0
- package/dist/domain/phones.js +3 -0
- package/dist/entities/contact-context.d.ts +6 -0
- package/dist/entities/contact-context.js +3 -0
- package/dist/entities/deal.d.ts +4 -0
- package/dist/entities/deal.js +3 -0
- package/dist/entities/index.d.ts +12 -0
- package/dist/entities/recorded-meeting.d.ts +17 -0
- package/dist/entities/recorded-meeting.js +15 -0
- package/dist/errors/reasons.js +3 -4
- package/dist/index.d.ts +1 -1
- package/dist/meetings/answers.d.ts +5 -0
- package/dist/meetings/answers.js +3 -0
- package/dist/meetings/index.d.ts +1 -1
- package/dist/meetings/participant-search.d.ts +5 -0
- package/dist/meetings/pull.js +2 -1
- package/dist/meetings/read-answers.d.ts +4 -0
- package/dist/meetings/read-answers.js +1 -0
- package/dist/meetings/source.d.ts +5 -0
- package/dist/meetings/store.d.ts +10 -1
- package/dist/models/ai.js +2 -2
- package/dist/models/endpoint.d.ts +7 -0
- package/dist/models/endpoint.js +10 -0
- package/dist/models/index.js +2 -2
- package/dist/oauth/keeper.js +1 -1
- package/dist/sends/guard.js +8 -6
- package/dist/services/communications.d.ts +2 -2
- package/dist/services/communications.js +24 -2
- package/dist/services/meeting-model.js +2 -1
- package/dist/services/person-context.d.ts +3 -0
- package/dist/services/person-context.js +9 -1
- package/dist/services/person-meetings.d.ts +36 -0
- package/dist/services/person-meetings.js +57 -0
- package/dist/speech/openai.js +5 -2
- package/dist/store/sqlite/crm-settings.d.ts +5 -1
- package/dist/store/sqlite/crm-settings.js +8 -0
- package/dist/store/sqlite/crm-stage-entries.d.ts +15 -0
- package/dist/store/sqlite/crm-stage-entries.js +74 -0
- package/dist/store/sqlite/crm.d.ts +8 -1
- package/dist/store/sqlite/crm.js +7 -1
- package/dist/store/sqlite/identities.js +3 -1
- package/dist/store/sqlite/involvements.d.ts +2 -0
- package/dist/store/sqlite/involvements.js +4 -1
- package/dist/store/sqlite/meeting-participant-search.js +9 -3
- package/dist/store/sqlite/meetings.js +7 -2
- package/dist/store/sqlite/person-match-scan.js +39 -15
- package/dist/update/index.d.ts +1 -1
- package/dist/update/index.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,71 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
|
|
|
5
5
|
minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
|
|
6
6
|
shape of this file.
|
|
7
7
|
|
|
8
|
+
## 0.650.0 — 13.11.2026
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **A call links to the CRM contact with the same phone.** A meeting source gives a participant's number
|
|
13
|
+
in `SourceParticipant.phone` (written with `+`); the store keeps it in `identities.phone`. The people scan then
|
|
14
|
+
joins the call's person and one other person when exactly the two hold the number, one of them is keyed by the
|
|
15
|
+
number itself (`phone:<E.164>`, as a phone line keeps a call's other side) and the number is a mobile; a landline
|
|
16
|
+
only proposes the pair, since an office's main line is everyone's who works there. The scan reads a CRM's number
|
|
17
|
+
written without `+` (`8 (912) 345-67-89`) in the store's `phone_countries`, and the contact's other numbers too.
|
|
18
|
+
See [MEETINGS.md, "Calls and the people they link to"](docs/dev/MEETINGS.md#calls-and-the-people-they-link-to).
|
|
19
|
+
- **`meetings show` and `meetings people` name each participant's person**: `person: { ref, name }`, `null` when the
|
|
20
|
+
identity is linked to no one; `meetings people` also finds a participant by that name.
|
|
21
|
+
- **A person's, an organization's and a deal's context list their recorded calls.** `contacts context` and the
|
|
22
|
+
canonical person context answer `meetings[]` (`personMeetings`); `communicationsOf`, and so the deal and
|
|
23
|
+
organization contexts, counts each call as a `meeting` touch with its `meeting:` ref; `deals show` and `leads show`
|
|
24
|
+
of a CRM copy answer `meetings[]`, the newest 10 of the people on it. Each item opens with `meetings show
|
|
25
|
+
<meeting_id>` of the CLI that owns its `account`.
|
|
26
|
+
- **`CORE_HOSTS` in `@wirecat/cli-core/constants`**: the hosts cli-core itself reaches in any tool (npm for
|
|
27
|
+
`upgrade`, the default model providers, the model downloads and the hosts they redirect to). A tool spreads them
|
|
28
|
+
into its WCAT identity's `hosts`, so `cli-dev manifest` lists them.
|
|
29
|
+
- **Stage tasks open on every stage a deal or lead entered, also one passed between two syncs.** A CRM source may
|
|
30
|
+
give `stageHistory(kind, since, after, context)`: the CRM's own record of each entry into a stage. While the
|
|
31
|
+
account has `stage-tasks` rules for the kind, `sync` reads it after the last entry it read (the first read from
|
|
32
|
+
when stage tasks last ran), keeps the entries on kept deals and leads as `crm.stage-entry` records, and the stage
|
|
33
|
+
tasks open from them: a deal moved A→B→C between two syncs gets the tasks of B and C. A source without it keeps
|
|
34
|
+
comparing the copy between syncs. A failed read is the issue `crm.stage-history-failed`; the deals and leads are
|
|
35
|
+
still synced. The funnel still counts the copy's own stage changes.
|
|
36
|
+
|
|
37
|
+
### Changed — may break callers
|
|
38
|
+
|
|
39
|
+
- **`oauth.missing` is now `session.missing`, and `ai.address-refused` is now `model.address-refused`.**
|
|
40
|
+
One reason for each: a profile that is not signed in, and a model address WireCat refuses. A CLI that raises or
|
|
41
|
+
checks the old names moves to the new ones.
|
|
42
|
+
- **The output schemas of `meetings show`, `meetings people`, `contacts context`, the person context and `deals
|
|
43
|
+
show` / `leads show` gain the fields above.** A CLI that pins its MCP output schemas updates its contract.
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- **The read-only lock lets server search and fetches through.** `<PREFIX>_READ_ONLY` promises "can read and sync but
|
|
48
|
+
never send", yet it refused every key the send guard checks, reads included: `search messages --backend server`
|
|
49
|
+
failed with `permission_error`, and the default `--backend both` dropped the server without a word. The keys that
|
|
50
|
+
only read from the messenger or work locally (`messages.server-search`, `messages.sync-first`, the stats syncs,
|
|
51
|
+
`conversations.embeddings`, `conversations.links`, `attachments.extract`, `store.gaps.repair`) now pass the lock, as
|
|
52
|
+
they already passed a flood hold. The profile's permission level still applies to each. Found by an agent test in
|
|
53
|
+
which tg under `TG_READ_ONLY` answered 6 of 10 questions and a Telegram MCP server 9
|
|
54
|
+
(tg-cli [#874](https://github.com/WireCatLabs/tg-cli/issues/874)).
|
|
55
|
+
- **An archive-only search over a partial history points at the server's search.** `search messages --backend
|
|
56
|
+
archive` on a messenger with its own search now leads `next` with `search.server` (the same query, `--backend
|
|
57
|
+
server`) when the local store misses part of a chat. Agents told to stay on the archive stopped there and answered
|
|
58
|
+
"not found" for messages the store never held
|
|
59
|
+
(tg-cli [#873](https://github.com/WireCatLabs/tg-cli/issues/873)).
|
|
60
|
+
|
|
61
|
+
### Security
|
|
62
|
+
|
|
63
|
+
- **The update check, the model calls, the meeting embeddings and OpenAI transcription reach only their own host.**
|
|
64
|
+
They go through cli-base's `hostFetch`: npm's registry, or the host of the model address the person set. A
|
|
65
|
+
redirect to another host is refused, and each exchange has a deadline (2 minutes; 10 for a transcription).
|
|
66
|
+
|
|
67
|
+
- **A run with moved folders removes nothing in the owner's folders (WC-SECR-24).** With only `<PREFIX>_CONFIG_DIR`
|
|
68
|
+
moved, `account remove` deleted the account file, the profile files and a stale serve lock in the owner's real
|
|
69
|
+
state folder, and `--delete-data` purged the account from the owner's store. Now each of them is kept, with its
|
|
70
|
+
reason under `kept`; the serve unit and schedules stay while `HOME` is the owner's.
|
|
71
|
+
[ACCOUNT-REMOVAL.md](docs/dev/ACCOUNT-REMOVAL.md)
|
|
72
|
+
|
|
8
73
|
## 0.649.0 — 13.11.2026
|
|
9
74
|
|
|
10
75
|
### Added
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { anthropic } from "../models/anthropic.js";
|
|
2
|
-
|
|
2
|
+
import { endpointFetch } from "../models/endpoint.js";
|
|
3
|
+
export const analyze = async (target, system, input, maxTokens) => anthropic.complete(target, { purpose: "analysis", system, prompt: input, maxTokens }, {}, target.apiKey, endpointFetch(target.baseUrl, 120_000));
|
|
@@ -63,6 +63,8 @@ export interface AccountRemoveOptions {
|
|
|
63
63
|
provider?: Provider;
|
|
64
64
|
/** Unset: the one `run()` set. */
|
|
65
65
|
resolveSettings?: (flags: GlobalFlags, options?: ResolveOptions) => Settings;
|
|
66
|
+
/** The owner's own home; unset, the account's from the user database. A test names its sandbox. */
|
|
67
|
+
ownerHome?: string;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* `<tool> <profile> account remove --keep-data|--delete-data`: signs the profile out the tool's way, forgets it on
|
|
@@ -11,7 +11,7 @@ import { thisMachine } from "../background/system.js";
|
|
|
11
11
|
import { locationVariables, platformFor } from "../background/units.js";
|
|
12
12
|
import { httpLockFile } from "../mcp/http/state.js";
|
|
13
13
|
import { sendsPathFor } from "../sends/journal.js";
|
|
14
|
-
import { storePath } from "../store/path.js";
|
|
14
|
+
import { accountHome, inOwnerFolder, storePath } from "../store/path.js";
|
|
15
15
|
import { openStore } from "../store/store.js";
|
|
16
16
|
import { readConfigFile, withoutPath } from "./config-issues.js";
|
|
17
17
|
import { baseContext, environmentOf } from "./context.js";
|
|
@@ -46,6 +46,20 @@ const insideOwnFolders = (app, env, extra) => {
|
|
|
46
46
|
return full;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
+
const within = (path, root) => path === root || path.startsWith(`${root}${sep}`);
|
|
50
|
+
/**
|
|
51
|
+
* WC-SECR-24: the tool's folders as the owner's own run has them. A run with moved folders shares the rest with the
|
|
52
|
+
* owner (only the config folder moved leaves the state folder the owner's), so it removes nothing inside these.
|
|
53
|
+
*/
|
|
54
|
+
const ownerFolders = (app, removal, hooks, home) => {
|
|
55
|
+
if (home === undefined)
|
|
56
|
+
return [];
|
|
57
|
+
const env = { HOME: home, USERPROFILE: home };
|
|
58
|
+
return [
|
|
59
|
+
...Object.values(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env })),
|
|
60
|
+
...(removal.ownFolders?.({ ...hooks, env }) ?? []),
|
|
61
|
+
].map((root) => absolute(root));
|
|
62
|
+
};
|
|
49
63
|
/** The profile's own serve unit, by its exact name, when one is installed; never a pattern over the unit folder. */
|
|
50
64
|
const serveUnit = (app, system, profile, env) => {
|
|
51
65
|
if (!env.HOME)
|
|
@@ -142,16 +156,32 @@ export const accountRemoveCommand = (app, removal, options = {}) => logsInOrOut(
|
|
|
142
156
|
if (holder)
|
|
143
157
|
throw new CliError("conflict", `${holder} is running for ${profile} — stop it first (\`${app.command} ${profile} server stop\`), then remove the account`, { reason: "account-remove.busy" });
|
|
144
158
|
const own = insideOwnFolders(app, env, removal.ownFolders?.(hooks) ?? []);
|
|
145
|
-
const
|
|
159
|
+
const ownerHome = options.ownerHome ?? accountHome();
|
|
160
|
+
const movedFolders = isMovedRun({ appName: app.appName, prefix: app.envPrefix, env });
|
|
161
|
+
const owners = movedFolders ? ownerFolders(app, removal, hooks, ownerHome) : [];
|
|
162
|
+
const inOwners = (path) => owners.some((root) => within(absolute(path), root));
|
|
163
|
+
const ownerHomeHere = movedFolders && ownerHome !== undefined && absolute(env.HOME ?? "") === absolute(ownerHome);
|
|
164
|
+
const ownersReason = "a run with moved folders never removes what lies in the owner's own folders";
|
|
165
|
+
const ownersKept = [];
|
|
166
|
+
const theRun = (paths) => paths.flatMap((path) => {
|
|
167
|
+
if (!inOwners(path))
|
|
168
|
+
return [own(path)];
|
|
169
|
+
if (existsSync(path))
|
|
170
|
+
ownersKept.push({ kind: "file", target: absolute(path), reason: ownersReason });
|
|
171
|
+
return [];
|
|
172
|
+
});
|
|
173
|
+
const schedules = movedFolders && (inOwners(state) || ownerHomeHere)
|
|
174
|
+
? []
|
|
175
|
+
: listSchedules(state).filter((schedule) => schedule.environment[`${app.envPrefix}_PROFILE`] === profile);
|
|
146
176
|
const serveLock = lockPath(app, profile, env);
|
|
147
177
|
const staleLock = readLock(serveLock);
|
|
148
|
-
const stateFiles = [
|
|
178
|
+
const stateFiles = theRun([
|
|
149
179
|
accountFile,
|
|
150
180
|
...profileFiles(app, profile, env, listSchedules(state)),
|
|
151
181
|
...(staleLock && !alive(staleLock.pid) ? [serveLock] : []),
|
|
152
182
|
...(removal.stateFiles?.(profile, hooks) ?? []),
|
|
153
|
-
]
|
|
154
|
-
const dataFiles = (removal.dataFiles?.(profile, hooks) ?? [])
|
|
183
|
+
]);
|
|
184
|
+
const dataFiles = theRun(removal.dataFiles?.(profile, hooks) ?? []);
|
|
155
185
|
const account = removal.account?.(profile, hooks) ??
|
|
156
186
|
(options.provider === undefined ? undefined : recalledAccount(app, options.provider, profile, env));
|
|
157
187
|
const secrets = (removal.secrets?.(profile, hooks) ?? []).map(({ credentials, accounts }) => ({
|
|
@@ -163,14 +193,18 @@ export const accountRemoveCommand = (app, removal, options = {}) => logsInOrOut(
|
|
|
163
193
|
}),
|
|
164
194
|
accounts,
|
|
165
195
|
}));
|
|
166
|
-
const
|
|
196
|
+
const ownersConfig = inOwners(settings.configPath);
|
|
197
|
+
const sections = removal.forgetConfig || ownersConfig ? [] : configSections(settings.configPath, profile);
|
|
198
|
+
if (ownersConfig)
|
|
199
|
+
ownersKept.push({ kind: "config", target: settings.configPath, reason: ownersReason });
|
|
200
|
+
const ownersStore = movedFolders && inOwnerFolder(storePath(env), ownerHome);
|
|
167
201
|
const storeHere = existsSync(storePath(env));
|
|
168
202
|
const system = environmentOf(this).system ?? thisMachine();
|
|
169
|
-
const unit = serveUnit(app, system, profile, env);
|
|
203
|
+
const unit = ownerHomeHere ? undefined : serveUnit(app, system, profile, env);
|
|
170
204
|
if (unit && (await platformFor(app, system, env).state(unit)).active)
|
|
171
205
|
throw new CliError("conflict", `${unit.name} is running for ${profile} — stop it first (\`${app.command} ${profile} server stop\`), then remove the account`, { reason: "account-remove.busy" });
|
|
172
206
|
const removed = [{ kind: "sign_in", target: `${app.command} sign-in of ${profile}` }];
|
|
173
|
-
const kept = [];
|
|
207
|
+
const kept = [...ownersKept];
|
|
174
208
|
// An entry the environment supplies is not this tool's to remove.
|
|
175
209
|
const saved = (store, name) => (store.read(name)?.source ?? "environment") !== "environment";
|
|
176
210
|
for (const { store, accounts } of secrets)
|
|
@@ -193,7 +227,9 @@ export const accountRemoveCommand = (app, removal, options = {}) => logsInOrOut(
|
|
|
193
227
|
if (data === "deleted") {
|
|
194
228
|
for (const file of dataFiles.filter(present))
|
|
195
229
|
removed.push({ kind: "file", target: file });
|
|
196
|
-
if (accountName && storeHere)
|
|
230
|
+
if (accountName && storeHere && ownersStore)
|
|
231
|
+
kept.push({ kind: "store", target: accountName, reason: ownersReason });
|
|
232
|
+
else if (accountName && storeHere)
|
|
197
233
|
removed.push({ kind: "store", target: accountName });
|
|
198
234
|
else
|
|
199
235
|
kept.push({
|
|
@@ -276,7 +312,7 @@ export const accountRemoveCommand = (app, removal, options = {}) => logsInOrOut(
|
|
|
276
312
|
for (const entry of removed)
|
|
277
313
|
if (entry.kind === "file")
|
|
278
314
|
rmSync(entry.target, { recursive: true, force: true });
|
|
279
|
-
if (removal.forgetConfig)
|
|
315
|
+
if (removal.forgetConfig && !ownersConfig)
|
|
280
316
|
for (const target of removal.forgetConfig(profile, hooks))
|
|
281
317
|
removed.push({ kind: "config", target });
|
|
282
318
|
else if (sections.length > 0)
|
|
@@ -215,7 +215,12 @@ const searchAction = (messenger) => async function (given) {
|
|
|
215
215
|
const skips = await context
|
|
216
216
|
.withStore((store) => historySkipsOf(store, found.coverage?.accounts ?? found.accounts ?? []))
|
|
217
217
|
.catch(() => []);
|
|
218
|
-
renderAnswer(this, context, messagesAnswer("search messages", found, {
|
|
218
|
+
renderAnswer(this, context, messagesAnswer("search messages", found, {
|
|
219
|
+
limit,
|
|
220
|
+
page: page ?? 1,
|
|
221
|
+
again,
|
|
222
|
+
archiveOnly: !discover && Boolean(messenger.serverSearch) && backendRequest(this).backend === "archive",
|
|
223
|
+
}, given.join(" "), skips), view);
|
|
219
224
|
};
|
|
220
225
|
const withOffset = (page, limit) => {
|
|
221
226
|
const offset = offsetOf(page, limit);
|
|
@@ -40,11 +40,13 @@ export interface Paging {
|
|
|
40
40
|
page?: number;
|
|
41
41
|
/** The query and options `page.next` repeats. */
|
|
42
42
|
again?: Record<string, unknown>;
|
|
43
|
+
/** Asked for the archive alone where the messenger's server could search too. */
|
|
44
|
+
archiveOnly?: boolean;
|
|
43
45
|
}
|
|
44
46
|
/** "showing 20 of 144", for the human view under a page of hits; `+` when the total is a lower bound. */
|
|
45
47
|
export declare const shownOf: (shown: number, offset: number, total: SearchTotal | undefined) => string | undefined;
|
|
46
48
|
/** `search messages` and `search mail`, CLI and MCP alike. */
|
|
47
|
-
export declare const messagesAnswer: (command: string, found: SearchFound, { limit, page, again }: Paging, query?: string, skips?: StoredHistorySkip[]) => ListBody<MessageHitItem>;
|
|
49
|
+
export declare const messagesAnswer: (command: string, found: SearchFound, { limit, page, again, archiveOnly }: Paging, query?: string, skips?: StoredHistorySkip[]) => ListBody<MessageHitItem>;
|
|
48
50
|
export declare const noteHitItem: (hit: FoundNote) => NoteHitItem;
|
|
49
51
|
export declare const allHitItem: (item: SearchAllItem) => HitItem;
|
|
50
52
|
/** `search notes`, CLI and MCP alike. */
|
|
@@ -258,10 +258,12 @@ export const shownOf = (shown, offset, total) => total === undefined || shown ==
|
|
|
258
258
|
? undefined
|
|
259
259
|
: `showing ${offset + 1}–${offset + shown} of ${total.value}${total.relation === "gte" ? "+" : ""}`;
|
|
260
260
|
/** `search messages` and `search mail`, CLI and MCP alike. */
|
|
261
|
-
export const messagesAnswer = (command, found, { limit, page, again }, query = "", skips = []) => {
|
|
261
|
+
export const messagesAnswer = (command, found, { limit, page, again, archiveOnly }, query = "", skips = []) => {
|
|
262
262
|
const accounts = found.coverage?.accounts ?? found.accounts ?? [];
|
|
263
263
|
const gaps = gapsOf(found);
|
|
264
264
|
const limited = historyLimitGaps(skips);
|
|
265
|
+
if (archiveOnly && query !== "" && gaps.missing.length + limited.missing.length > 0)
|
|
266
|
+
gaps.next.unshift(nextStep("search.server", { args: { query, backend: "server" } }));
|
|
265
267
|
return listOf(command, {
|
|
266
268
|
items: [...found.items.map((hit) => messageHitItem(hit, query)), ...pictureItems(found)],
|
|
267
269
|
limit,
|
package/dist/cli/steps.js
CHANGED
|
@@ -20,6 +20,15 @@ export const STEPS = defineSteps([
|
|
|
20
20
|
],
|
|
21
21
|
why: "the local copy is missing messages; syncing brings them in",
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
id: "search.server",
|
|
25
|
+
command: "search messages",
|
|
26
|
+
args: [
|
|
27
|
+
{ name: "query", required: true },
|
|
28
|
+
{ name: "backend", required: true },
|
|
29
|
+
],
|
|
30
|
+
why: "only the local copy was searched, and it does not hold every message; the messenger's own search reaches the rest",
|
|
31
|
+
},
|
|
23
32
|
{
|
|
24
33
|
id: "messages.transcribe",
|
|
25
34
|
command: "messages transcribe",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CliError, isCliError } from "@wirecat/cli-base";
|
|
2
|
+
// gcal-cli raised its own oauth.missing before cli-core merged it into session.missing (FIND-2583).
|
|
2
3
|
const NOT_SIGNED_IN = new Set([undefined, "session.missing", "oauth.missing"]);
|
|
3
4
|
/**
|
|
4
5
|
* A "not signed in" failure for a first word this computer has never seen as a profile is most likely a typo: it
|
|
@@ -81,3 +81,9 @@ export declare const oauthClientReport: (app: {
|
|
|
81
81
|
source?: AppSource | undefined;
|
|
82
82
|
} | undefined, reason?: string) => OAuthClientReport;
|
|
83
83
|
export type { AppSource };
|
|
84
|
+
/**
|
|
85
|
+
* The hosts cli-core itself reaches in any tool: npm for `upgrade`, the default model providers, and the model
|
|
86
|
+
* downloads with the hosts they redirect to. A tool spreads them into its WCAT identity's `hosts`, so `cli-dev manifest`
|
|
87
|
+
* lists them; a model endpoint or calendar feed the person configures belongs in `userHosts`.
|
|
88
|
+
*/
|
|
89
|
+
export declare const CORE_HOSTS: readonly string[];
|
package/dist/constants/index.js
CHANGED
|
@@ -75,3 +75,17 @@ export const microsoftApp = (options) => {
|
|
|
75
75
|
export const oauthClientReport = (app, reason) => app?.source
|
|
76
76
|
? { client: app.source === "constants" ? "wirecat" : "own", source: app.source }
|
|
77
77
|
: { client: null, source: null, ...(reason ? { reason } : {}) };
|
|
78
|
+
/**
|
|
79
|
+
* The hosts cli-core itself reaches in any tool: npm for `upgrade`, the default model providers, and the model
|
|
80
|
+
* downloads with the hosts they redirect to. A tool spreads them into its WCAT identity's `hosts`, so `cli-dev manifest`
|
|
81
|
+
* lists them; a model endpoint or calendar feed the person configures belongs in `userHosts`.
|
|
82
|
+
*/
|
|
83
|
+
export const CORE_HOSTS = [
|
|
84
|
+
"registry.npmjs.org",
|
|
85
|
+
"api.openai.com",
|
|
86
|
+
"api.anthropic.com",
|
|
87
|
+
"huggingface.co",
|
|
88
|
+
"*.hf.co",
|
|
89
|
+
"github.com",
|
|
90
|
+
"release-assets.githubusercontent.com",
|
|
91
|
+
];
|
package/dist/crm/cli/index.js
CHANGED
|
@@ -15,6 +15,8 @@ import { CRM_KINDS } from "../../domain/crm.js";
|
|
|
15
15
|
import { DEAL_KINDS, DEAL_STATUSES } from "../../domain/deals.js";
|
|
16
16
|
import { deal as dealEntity } from "../../entities/deal.js";
|
|
17
17
|
import { count, text } from "../../entities/fields.js";
|
|
18
|
+
import { readableAccounts } from "../../services/person-context.js";
|
|
19
|
+
import { personMeetings } from "../../services/person-meetings.js";
|
|
18
20
|
import { CRM_SCOPES, crmSettingKey } from "../../store/sqlite/crm-settings.js";
|
|
19
21
|
import { openStageTasks } from "../stage-tasks.js";
|
|
20
22
|
import { crmStatus, syncCrm } from "../sync.js";
|
|
@@ -63,6 +65,8 @@ const DEAL_UNTRUSTED = [
|
|
|
63
65
|
];
|
|
64
66
|
/** `show` lists this many of a deal's activities: the open ones come first, so a long history does not hide them. */
|
|
65
67
|
const SHOWN_ACTIVITIES = 20;
|
|
68
|
+
/** The newest recorded meetings and calls of the people on a deal or lead that `show` lists. */
|
|
69
|
+
const SHOWN_MEETINGS = 10;
|
|
66
70
|
const PIPELINE_UNTRUSTED = ["name", "stages.name"];
|
|
67
71
|
const STAGE_UNTRUSTED = ["name", "pipeline_name"];
|
|
68
72
|
const crmContactsRemoved = v.strictObject({
|
|
@@ -201,13 +205,16 @@ const addCrmCommandsDefinition = (program, options) => {
|
|
|
201
205
|
.action(async (opts, command) => {
|
|
202
206
|
const { signal } = environmentOf(command);
|
|
203
207
|
await within(command, async (run) => {
|
|
204
|
-
const
|
|
208
|
+
const source = run.source();
|
|
209
|
+
const report = await syncCrm(source, run.store, run.account, {
|
|
205
210
|
now: now(),
|
|
206
211
|
budget: runBudgetOf(command, opts.maxPages),
|
|
207
212
|
...(signal ? { signal } : {}),
|
|
208
213
|
...(opts.rescan ? { rescan: true } : {}),
|
|
209
214
|
});
|
|
210
|
-
const stageTasks = await openStageTasks(run.store, run.account, now()
|
|
215
|
+
const stageTasks = await openStageTasks(run.store, run.account, now(), {
|
|
216
|
+
history: source.stageHistory !== undefined,
|
|
217
|
+
});
|
|
211
218
|
const failed = report.synced.filter((one) => one.error !== undefined);
|
|
212
219
|
// A kind that failed on a setting fails the same way again until the owner changes it: no retry is offered.
|
|
213
220
|
const retried = failed.filter((one) => one.setting === undefined);
|
|
@@ -327,8 +334,9 @@ const addCrmCommandsDefinition = (program, options) => {
|
|
|
327
334
|
});
|
|
328
335
|
});
|
|
329
336
|
example(annotate(group.command("show"), { effects: LOCAL_READ, output: { entity: kind } })
|
|
330
|
-
.description(`one ${kind} with its pipeline, stage, status, amount and the people on it
|
|
331
|
-
"
|
|
337
|
+
.description(`one ${kind} with its pipeline, stage, status, amount and the people on it, and the newest recorded ` +
|
|
338
|
+
"meetings and calls of those people in this account's scope; with the activities setting on, its " +
|
|
339
|
+
"activities and tasks too")
|
|
332
340
|
.argument(`<${kind}>`, `${kind}:<id>, as a list shows it`), `${plural} show ${kind}:12`).action(async (reference, _opts, command) => {
|
|
333
341
|
await within(command, async (run) => {
|
|
334
342
|
const found = await ownCopy(run, kind, reference);
|
|
@@ -345,10 +353,27 @@ const addCrmCommandsDefinition = (program, options) => {
|
|
|
345
353
|
updated_at: new Date(one.updatedAt).toISOString(),
|
|
346
354
|
}))
|
|
347
355
|
: undefined;
|
|
356
|
+
const recorded = await personMeetings(run.store, found.people.filter(({ owner }) => !owner).map(({ ref }) => ref.slice("person:".length)), await readableAccounts(run.store, run.account), { limit: SHOWN_MEETINGS });
|
|
357
|
+
const meetings = recorded.items.map((one) => ({
|
|
358
|
+
ref: one.ref,
|
|
359
|
+
meeting_id: one.meetingId,
|
|
360
|
+
account: one.account,
|
|
361
|
+
title: one.title,
|
|
362
|
+
started_at: one.startedAt,
|
|
363
|
+
duration_ms: one.durationMs,
|
|
364
|
+
has_transcript: one.hasTranscript,
|
|
365
|
+
event: one.event,
|
|
366
|
+
people: one.people,
|
|
367
|
+
}));
|
|
348
368
|
return itemOf({
|
|
349
369
|
...dealKeys(found),
|
|
370
|
+
meetings,
|
|
350
371
|
...(activities ? { activities } : {}),
|
|
351
|
-
untrusted:
|
|
372
|
+
untrusted: [
|
|
373
|
+
...DEAL_UNTRUSTED,
|
|
374
|
+
"meetings.title",
|
|
375
|
+
...(activities ? ["activities.subject", "activities.body"] : []),
|
|
376
|
+
],
|
|
352
377
|
});
|
|
353
378
|
});
|
|
354
379
|
});
|
package/dist/crm/source.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CrmActivity, CrmDepartment, CrmField, CrmKind, CrmPipeline, CrmRecords, CrmScope, CrmUser } from "../domain/crm.js";
|
|
1
|
+
import type { CrmActivity, CrmDepartment, CrmField, CrmKind, CrmPipeline, CrmRecords, CrmScope, CrmStageEntry, CrmUser } from "../domain/crm.js";
|
|
2
2
|
import type { DealKind } from "../domain/deals.js";
|
|
3
3
|
export interface CrmSourceTraits {
|
|
4
4
|
/** What this CRM has: one without leads leaves `lead` out. Contacts and companies come before the items on them. */
|
|
@@ -102,4 +102,11 @@ export interface CrmSource {
|
|
|
102
102
|
* them leaves it out. A list the sign-in may not read is a `gap`, and the others are still read.
|
|
103
103
|
*/
|
|
104
104
|
activities?(since: number, page?: string, context?: CrmCallContext): Promise<CrmPage<CrmActivity>>;
|
|
105
|
+
/**
|
|
106
|
+
* The kind's entries into a stage that the CRM's own history recorded, oldest first, a page at a time: after the
|
|
107
|
+
* entry `after` (its `externalId`), or from `since` (epoch ms) without it; the last page's `cursor` is the last entry
|
|
108
|
+
* read, or `after` when none came. With it, stage tasks open on each stage entered, one passed between two syncs too.
|
|
109
|
+
* Read only while the account has `stage-tasks` rules for the kind.
|
|
110
|
+
*/
|
|
111
|
+
stageHistory?(kind: DealKind, since: number, after?: string, context?: CrmCallContext): Promise<CrmPage<CrmStageEntry>>;
|
|
105
112
|
}
|
|
@@ -5,4 +5,6 @@ import type { AccountKey } from "../store/types.js";
|
|
|
5
5
|
* one per entry, so a dismissed task never comes back and a later entry into the same stage opens a new one.
|
|
6
6
|
* Answers how many it opened.
|
|
7
7
|
*/
|
|
8
|
-
export declare const openStageTasks: (store: MessageStore, account: AccountKey, now: number
|
|
8
|
+
export declare const openStageTasks: (store: MessageStore, account: AccountKey, now: number, { history }?: {
|
|
9
|
+
history?: boolean;
|
|
10
|
+
}) => Promise<number>;
|
package/dist/crm/stage-tasks.js
CHANGED
|
@@ -6,11 +6,13 @@ const DAY = 86_400_000;
|
|
|
6
6
|
* one per entry, so a dismissed task never comes back and a later entry into the same stage opens a new one.
|
|
7
7
|
* Answers how many it opened.
|
|
8
8
|
*/
|
|
9
|
-
export const openStageTasks = async (store, account, now) => {
|
|
9
|
+
export const openStageTasks = async (store, account, now, { history = false } = {}) => {
|
|
10
10
|
const rules = await store.crm.stageTasks(account);
|
|
11
11
|
if (Object.keys(rules.deal).length + Object.keys(rules.lead).length === 0)
|
|
12
12
|
return 0;
|
|
13
|
-
const
|
|
13
|
+
const changes = await store.crm.stageMoves(account);
|
|
14
|
+
// A CRM with a stage history names every stage entered; the copy's own changes miss one passed between two syncs.
|
|
15
|
+
const moves = history ? await store.crm.stageEntries(account) : changes.moves;
|
|
14
16
|
// Every deal entering a stage gets the same title, so the duplicate review would pair tasks of different deals.
|
|
15
17
|
const { reviewDuplicates: _review, ...tasks } = store.tasks;
|
|
16
18
|
const service = createTaskService({ store: tasks, now: () => new Date(now) });
|
|
@@ -23,7 +25,7 @@ export const openStageTasks = async (store, account, now) => {
|
|
|
23
25
|
const responsible = item.people.find((one) => one.role === "owner")?.name ??
|
|
24
26
|
(item.assignee === null ? "nobody" : `CRM user ${item.assignee.split("/").at(-1)}`);
|
|
25
27
|
const { created } = await service.add({
|
|
26
|
-
source:
|
|
28
|
+
source: move.source,
|
|
27
29
|
sourceKind: move.kind,
|
|
28
30
|
account: taskAccount(account),
|
|
29
31
|
group: move.ref,
|
|
@@ -37,6 +39,8 @@ export const openStageTasks = async (store, account, now) => {
|
|
|
37
39
|
if (created)
|
|
38
40
|
opened += 1;
|
|
39
41
|
}
|
|
40
|
-
|
|
42
|
+
if (history)
|
|
43
|
+
await store.crm.handleStageEntries(moves.map(({ id }) => id));
|
|
44
|
+
await store.crm.markStageMoves(account, changes.through);
|
|
41
45
|
return opened;
|
|
42
46
|
};
|
package/dist/crm/sync.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface CrmSyncOptions {
|
|
|
50
50
|
export interface CrmSyncIssue {
|
|
51
51
|
/** `user`: the account's users and departments. */
|
|
52
52
|
kind: CrmKind | "user";
|
|
53
|
-
reason: CrmSkipped["reason"] | CrmRelationIssue["reason"] | "crm.unlisted-held" | "crm.narrowing-held" | "crm.unassigned-dropped" | "crm.not-reported" | "crm.pending-dropped" | "crm.activities-failed";
|
|
53
|
+
reason: CrmSkipped["reason"] | CrmRelationIssue["reason"] | "crm.unlisted-held" | "crm.narrowing-held" | "crm.unassigned-dropped" | "crm.not-reported" | "crm.pending-dropped" | "crm.activities-failed" | "crm.stage-history-failed";
|
|
54
54
|
message: string;
|
|
55
55
|
externalId?: string;
|
|
56
56
|
}
|
package/dist/crm/sync.js
CHANGED
|
@@ -214,6 +214,45 @@ const readActivities = async (run) => {
|
|
|
214
214
|
return null;
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
|
+
const STAGE_HISTORY = "crm:stage-history:";
|
|
218
|
+
/**
|
|
219
|
+
* The CRM's own stage history of each kind with `stage-tasks` rules, after the last entry read: the first read goes
|
|
220
|
+
* from when stage tasks were last opened, so no entry is missed and none before the rules counts. Without rules the
|
|
221
|
+
* history is not read, and its place is dropped, so rules set again later start from then.
|
|
222
|
+
*/
|
|
223
|
+
const readStageHistory = async (run) => {
|
|
224
|
+
const { source, store, account } = run;
|
|
225
|
+
if (!source.stageHistory)
|
|
226
|
+
return null;
|
|
227
|
+
const rules = await store.crm.stageTasks(account);
|
|
228
|
+
const since = await store.crm.stageTasksSince(account);
|
|
229
|
+
for (const kind of DEAL_KINDS) {
|
|
230
|
+
const key = `${STAGE_HISTORY}${kind}`;
|
|
231
|
+
if (since === null || Object.keys(rules[kind]).length === 0) {
|
|
232
|
+
await store.sync.clearSyncState(account, key);
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
let after = (await store.sync.syncState(account, key))?.value;
|
|
236
|
+
for (;;) {
|
|
237
|
+
const why = run.budget.take();
|
|
238
|
+
if (why)
|
|
239
|
+
return why;
|
|
240
|
+
const page = await source.stageHistory.call(source, kind, since, after, run.context);
|
|
241
|
+
await store.crm.saveStageEntries(account, page.items);
|
|
242
|
+
run.moved();
|
|
243
|
+
const next = page.hasMore ? page.nextCursor : (page.cursor ?? after);
|
|
244
|
+
if (next !== undefined && next !== null) {
|
|
245
|
+
after = next;
|
|
246
|
+
await store.sync.setSyncState(account, key, next);
|
|
247
|
+
}
|
|
248
|
+
if (!page.hasMore || page.nextCursor === undefined)
|
|
249
|
+
break;
|
|
250
|
+
if (run.signal?.aborted)
|
|
251
|
+
return "cancelled";
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
};
|
|
217
256
|
/** Runs a step whose source call may spend the budget mid-way: a spent budget is a stop, not a failure. */
|
|
218
257
|
const stopping = async (step) => {
|
|
219
258
|
try {
|
|
@@ -601,6 +640,21 @@ export const syncCrm = async (source, store, account, options = {}) => {
|
|
|
601
640
|
});
|
|
602
641
|
}
|
|
603
642
|
}
|
|
643
|
+
if (!stopped && kinds.some(isItemKind)) {
|
|
644
|
+
try {
|
|
645
|
+
stopped = await stopping(() => readStageHistory(run));
|
|
646
|
+
}
|
|
647
|
+
catch (error) {
|
|
648
|
+
if (options.signal?.aborted)
|
|
649
|
+
stopped = "cancelled";
|
|
650
|
+
else
|
|
651
|
+
report.issues.push({
|
|
652
|
+
kind: "deal",
|
|
653
|
+
reason: "crm.stage-history-failed",
|
|
654
|
+
message: isCliFailure(error) ? error.message : "the stage history could not be read",
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
}
|
|
604
658
|
const narrowed = report.synced.some((one) => one.outOfScope > 0);
|
|
605
659
|
const whole = report.synced.every((one) => one.state === "complete" && one.error === undefined && !one.held && one.pass !== "held");
|
|
606
660
|
// Contacts have no scope of their own and no deletion check: they leave with the last deal or lead naming them.
|
package/dist/domain/crm.d.ts
CHANGED
|
@@ -206,3 +206,18 @@ export declare const isCrmUserId: (id: string) => boolean;
|
|
|
206
206
|
/** One spelling per user id, so `015`, ` 15` and `15` are one user wherever they come from. */
|
|
207
207
|
export declare const normalCrmUserId: (id: string) => string;
|
|
208
208
|
export declare const isItemKind: (kind: CrmKind) => kind is DealKind;
|
|
209
|
+
/**
|
|
210
|
+
* One entry of a deal or lead into a stage, as the CRM's own history recorded it: also a stage passed between two
|
|
211
|
+
* syncs, which the copy never stood in. A row's first stage is no entry.
|
|
212
|
+
*/
|
|
213
|
+
export interface CrmStageEntry {
|
|
214
|
+
/** The history row's id in the CRM, ascending within a kind: the next read goes on after the last one. */
|
|
215
|
+
externalId: string;
|
|
216
|
+
kind: DealKind;
|
|
217
|
+
/** The deal's or lead's own id. */
|
|
218
|
+
item: string;
|
|
219
|
+
pipeline: string;
|
|
220
|
+
stage: string;
|
|
221
|
+
/** When it entered the stage, epoch ms. */
|
|
222
|
+
at: number;
|
|
223
|
+
}
|
package/dist/domain/phones.d.ts
CHANGED
|
@@ -38,6 +38,8 @@ export declare const typedPhone: (typed: string, { phoneCountries }?: PhoneOptio
|
|
|
38
38
|
* `phone_countries` setting reads `4155550100` as Russian, so it never decides an identifier.
|
|
39
39
|
*/
|
|
40
40
|
export declare const e164Of: (phone: string, region: string | undefined) => string | null | undefined;
|
|
41
|
+
/** An E.164 number that some country's plan reads as a mobile: a person's own line, not an office's. */
|
|
42
|
+
export declare const isMobilePhone: (e164: string) => boolean;
|
|
41
43
|
/** The messengers that keep a contact's number as bare international digits, the `+` left off. */
|
|
42
44
|
export declare const BARE_INTERNATIONAL_PROVIDERS: readonly string[];
|
|
43
45
|
/**
|
package/dist/domain/phones.js
CHANGED
|
@@ -83,6 +83,9 @@ export const e164Of = (phone, region) => {
|
|
|
83
83
|
const digits = phone.replace(/\(0\)/, "").replace(/\D/g, "");
|
|
84
84
|
return nationalPhone(digits, [region], { anyType: true })?.value;
|
|
85
85
|
};
|
|
86
|
+
/** An E.164 number that some country's plan reads as a mobile: a person's own line, not an office's. */
|
|
87
|
+
export const isMobilePhone = (e164) => /^\+\d+$/.test(e164) &&
|
|
88
|
+
PHONE_COUNTRIES.some((country) => nationalPhone(e164.slice(1), [country], { anyType: false })?.value === e164);
|
|
86
89
|
/** The messengers that keep a contact's number as bare international digits, the `+` left off. */
|
|
87
90
|
export const BARE_INTERNATIONAL_PROVIDERS = ["telegram", "max", "whatsapp"];
|
|
88
91
|
/**
|
|
@@ -166,6 +166,8 @@ declare const context: v.StrictObjectSchema<{
|
|
|
166
166
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
167
167
|
}, undefined>, undefined>;
|
|
168
168
|
}, undefined>, undefined>;
|
|
169
|
+
/** Recorded meetings and calls they took part in, newest first. */
|
|
170
|
+
readonly meetings: v.OptionalSchema<v.ArraySchema<v.GenericSchema<import("./recorded-meeting.js").RecordedMeeting>, undefined>, undefined>;
|
|
169
171
|
readonly limits: v.StrictObjectSchema<{
|
|
170
172
|
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
171
173
|
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -961,6 +963,8 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
961
963
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
962
964
|
}, undefined>, undefined>;
|
|
963
965
|
}, undefined>, undefined>;
|
|
966
|
+
/** Recorded meetings and calls they took part in, newest first. */
|
|
967
|
+
readonly meetings: v.OptionalSchema<v.ArraySchema<v.GenericSchema<import("./recorded-meeting.js").RecordedMeeting>, undefined>, undefined>;
|
|
964
968
|
readonly limits: v.StrictObjectSchema<{
|
|
965
969
|
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
966
970
|
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -1767,6 +1771,8 @@ export declare const contactPreparation: v.StrictObjectSchema<{
|
|
|
1767
1771
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1768
1772
|
}, undefined>, undefined>;
|
|
1769
1773
|
}, undefined>, undefined>;
|
|
1774
|
+
/** Recorded meetings and calls they took part in, newest first. */
|
|
1775
|
+
readonly meetings: v.OptionalSchema<v.ArraySchema<v.GenericSchema<import("./recorded-meeting.js").RecordedMeeting>, undefined>, undefined>;
|
|
1770
1776
|
readonly limits: v.StrictObjectSchema<{
|
|
1771
1777
|
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1772
1778
|
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -3,6 +3,7 @@ import { chat } from "./chat.js";
|
|
|
3
3
|
import { linkedPerson } from "./contact-activity.js";
|
|
4
4
|
import { count, id, reference, text, time } from "./fields.js";
|
|
5
5
|
import { message } from "./message.js";
|
|
6
|
+
import { recordedMeeting } from "./recorded-meeting.js";
|
|
6
7
|
const contextPerson = v.strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7
8
|
export const contextMessage = v.strictObject({
|
|
8
9
|
locator: reference,
|
|
@@ -48,6 +49,8 @@ const context = v.strictObject({
|
|
|
48
49
|
mentions: v.array(contextMessage),
|
|
49
50
|
/** Calendar events they are invited to, one occurrence per series. */
|
|
50
51
|
events: v.optional(v.strictObject({ upcoming: v.array(contextEvent), recent: v.array(contextEvent) })),
|
|
52
|
+
/** Recorded meetings and calls they took part in, newest first. */
|
|
53
|
+
meetings: v.optional(v.array(recordedMeeting)),
|
|
51
54
|
limits: v.strictObject({ messages: count, bytes: count }),
|
|
52
55
|
complete: v.boolean(),
|
|
53
56
|
not_read: v.array(v.strictObject({
|
package/dist/entities/deal.d.ts
CHANGED
|
@@ -84,6 +84,8 @@ export declare const deal: v.StrictObjectSchema<{
|
|
|
84
84
|
readonly updated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
85
85
|
/** `show` of a CRM copy whose `activities` setting is on: its activities and tasks, open ones first. */
|
|
86
86
|
readonly activities: v.OptionalSchema<v.ArraySchema<v.GenericSchema<DealActivity>, undefined>, undefined>;
|
|
87
|
+
/** `show` of a CRM copy: the newest recorded meetings and calls of its people, in its account's scope. */
|
|
88
|
+
readonly meetings: v.OptionalSchema<v.ArraySchema<v.GenericSchema<import("./recorded-meeting.js").RecordedMeeting>, undefined>, undefined>;
|
|
87
89
|
readonly untrusted: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
88
90
|
}, undefined>;
|
|
89
91
|
/** A lead (`lead:<id>`): a deal's shape, in a lead pipeline. */
|
|
@@ -155,6 +157,8 @@ export declare const lead: v.StrictObjectSchema<{
|
|
|
155
157
|
readonly updated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>;
|
|
156
158
|
/** `show` of a CRM copy whose `activities` setting is on: its activities and tasks, open ones first. */
|
|
157
159
|
readonly activities: v.OptionalSchema<v.ArraySchema<v.GenericSchema<DealActivity>, undefined>, undefined>;
|
|
160
|
+
/** `show` of a CRM copy: the newest recorded meetings and calls of its people, in its account's scope. */
|
|
161
|
+
readonly meetings: v.OptionalSchema<v.ArraySchema<v.GenericSchema<import("./recorded-meeting.js").RecordedMeeting>, undefined>, undefined>;
|
|
158
162
|
readonly untrusted: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
159
163
|
}, undefined>;
|
|
160
164
|
/** A pipeline (`pipeline:<id>`) with its stages in order; `pipelines show` adds the funnel. */
|