@wirecat/cli-core 0.617.0 → 0.619.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 +406 -1
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES +3 -0
- package/dist/background/backfill.d.ts +21 -0
- package/dist/background/backfill.js +41 -0
- package/dist/background/daily-archive-timer.d.ts +1 -1
- package/dist/background/deliver.d.ts +5 -2
- package/dist/background/deliver.js +30 -12
- package/dist/background/report/messages.js +4 -1
- package/dist/background/report/render.d.ts +3 -1
- package/dist/background/report/render.js +3 -1
- package/dist/background/report/view.js +4 -1
- package/dist/background/schedules.d.ts +17 -0
- package/dist/background/schedules.js +21 -8
- package/dist/calendar/cli/answers.d.ts +1 -0
- package/dist/calendar/cli/answers.js +6 -1
- package/dist/calendar/cli/index.js +2 -14
- package/dist/calendar/cli/people-link.d.ts +3 -0
- package/dist/calendar/cli/people-link.js +23 -0
- package/dist/calendar/index.d.ts +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar/mcp/index.d.ts +12 -12
- package/dist/cli/base-stages-command.d.ts +22 -0
- package/dist/cli/base-stages-command.js +174 -0
- package/dist/cli/command-runs.d.ts +2 -0
- package/dist/cli/command-runs.js +3 -1
- package/dist/cli/config-command.js +6 -1
- package/dist/cli/context.d.ts +5 -0
- package/dist/cli/context.js +1 -0
- package/dist/cli/group-lock.d.ts +42 -0
- package/dist/cli/group-lock.js +130 -0
- package/dist/cli/index.d.ts +10 -4
- package/dist/cli/index.js +10 -4
- package/dist/cli/messenger/backfill-command.js +27 -15
- package/dist/cli/messenger/contacts-command.js +10 -3
- package/dist/cli/messenger/context.js +1 -0
- package/dist/cli/messenger/doctor-command.js +3 -1
- package/dist/cli/messenger/models-command.js +1 -1
- package/dist/cli/messenger/serve-command.js +24 -2
- package/dist/cli/messenger/serve-outdated.d.ts +22 -0
- package/dist/cli/messenger/serve-outdated.js +100 -0
- package/dist/cli/messenger/store-maintenance-command.d.ts +22 -2
- package/dist/cli/messenger/store-maintenance-command.js +9 -4
- package/dist/cli/model-catalogue-command.d.ts +3 -1
- package/dist/cli/model-catalogue-command.js +46 -2
- package/dist/cli/profile.d.ts +8 -0
- package/dist/cli/profile.js +25 -0
- package/dist/cli/program.js +2 -0
- package/dist/cli/runs/search-query.d.ts +1 -1
- package/dist/cli/runs/search-query.js +4 -0
- package/dist/cli/runs/search.d.ts +5 -1
- package/dist/cli/runs/search.js +12 -1
- package/dist/cli/schedule/schedule-command.d.ts +9 -0
- package/dist/cli/schedule/schedule-command.js +13 -0
- package/dist/cli/search-left-out.d.ts +6 -1
- package/dist/cli/search-left-out.js +9 -4
- package/dist/cli/settings.d.ts +8 -0
- package/dist/cli/settings.js +17 -2
- package/dist/cli/shared-command-exports.d.ts +16 -0
- package/dist/cli/store-recover.d.ts +3 -3
- package/dist/cli/store-recover.js +47 -23
- package/dist/cli/store-settings.d.ts +2 -0
- package/dist/cli/store-settings.js +37 -9
- package/dist/crm/cli/index.js +38 -6
- package/dist/crm/group-hint.d.ts +8 -0
- package/dist/crm/group-hint.js +13 -0
- package/dist/crm/source.d.ts +12 -1
- package/dist/crm/sync.d.ts +31 -2
- package/dist/crm/sync.js +110 -3
- package/dist/crm/testing/acme-scenario.d.ts +40 -0
- package/dist/crm/testing/acme-scenario.js +170 -0
- package/dist/crm/testing/index.d.ts +1 -0
- package/dist/crm/testing/index.js +1 -0
- package/dist/crm/testing/source-contract.js +12 -0
- package/dist/crm/testing/source.d.ts +2 -0
- package/dist/crm/testing/source.js +1 -0
- package/dist/domain/addresses.d.ts +13 -0
- package/dist/domain/addresses.js +63 -0
- package/dist/domain/categories.d.ts +3 -0
- package/dist/domain/categories.js +2 -0
- package/dist/domain/crm.d.ts +23 -0
- package/dist/domain/crm.js +7 -0
- package/dist/domain/links.d.ts +17 -4
- package/dist/domain/links.js +20 -7
- package/dist/domain/mentions.d.ts +2 -12
- package/dist/domain/mentions.js +2 -19
- package/dist/domain/orders.d.ts +8 -1
- package/dist/domain/orders.js +6 -2
- package/dist/domain/phones.d.ts +26 -0
- package/dist/domain/phones.js +48 -0
- package/dist/domain/record-types.d.ts +1 -1
- package/dist/domain/record-types.js +1 -0
- package/dist/domain/records.d.ts +5 -0
- package/dist/domain/ref-summaries.d.ts +39 -0
- package/dist/domain/ref-summaries.js +51 -3
- package/dist/domain/relations.d.ts +27 -2
- package/dist/domain/relations.js +37 -3
- package/dist/domain/vcard.d.ts +2 -2
- package/dist/domain/vcard.js +4 -10
- package/dist/embeddings/models.d.ts +11 -3
- package/dist/embeddings/models.js +28 -4
- package/dist/entities/business-context.d.ts +149 -0
- package/dist/entities/business-context.js +192 -0
- package/dist/entities/contact-activity.d.ts +2 -0
- package/dist/entities/contact-activity.js +7 -1
- package/dist/entities/contact-context.d.ts +157 -0
- package/dist/entities/contact-context.js +2 -0
- package/dist/entities/deal.d.ts +10 -0
- package/dist/entities/deal.js +2 -0
- package/dist/entities/index.d.ts +23 -3
- package/dist/entities/index.js +5 -0
- package/dist/entities/mention.d.ts +4 -3
- package/dist/entities/mention.js +2 -1
- package/dist/entities/message-transfer.d.ts +4 -2
- package/dist/entities/message-transfer.js +2 -2
- package/dist/entities/model.d.ts +2 -2
- package/dist/entities/model.js +1 -1
- package/dist/entities/relationship.d.ts +4 -0
- package/dist/entities/relationship.js +4 -0
- package/dist/errors/reasons.js +44 -4
- package/dist/fetch/page.js +2 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/dist/meetings/context-store.d.ts +2 -0
- package/dist/meetings/findings-rules.d.ts +4 -0
- package/dist/meetings/findings-rules.js +5 -2
- package/dist/meetings/mcp/index.d.ts +15 -15
- package/dist/meetings/result-items.d.ts +1 -0
- package/dist/meetings/result-items.js +1 -0
- package/dist/models/index.js +22 -5
- package/dist/runs/events.d.ts +11 -1
- package/dist/runs/events.js +3 -1
- package/dist/runs/log-attributes.js +4 -0
- package/dist/runs/log-events.js +2 -0
- package/dist/runs/recording.d.ts +3 -0
- package/dist/runs/recording.js +36 -12
- package/dist/runs/run.d.ts +12 -3
- package/dist/runs/run.js +32 -13
- package/dist/search/account-list.d.ts +6 -0
- package/dist/search/account-list.js +9 -3
- package/dist/search/groups.d.ts +68 -0
- package/dist/search/groups.js +172 -0
- package/dist/services/account-groups.d.ts +28 -0
- package/dist/services/account-groups.js +89 -0
- package/dist/services/archive.d.ts +7 -1
- package/dist/services/archive.js +19 -3
- package/dist/services/business-context.d.ts +113 -0
- package/dist/services/business-context.js +156 -0
- package/dist/services/communications.d.ts +50 -0
- package/dist/services/communications.js +140 -0
- package/dist/services/deal-context.d.ts +90 -0
- package/dist/services/deal-context.js +131 -0
- package/dist/services/deps.d.ts +2 -0
- package/dist/services/enrichment.d.ts +7 -2
- package/dist/services/enrichment.js +46 -5
- package/dist/services/events-search.js +2 -1
- package/dist/services/group-guard.d.ts +28 -0
- package/dist/services/group-guard.js +131 -0
- package/dist/services/index.d.ts +15 -2
- package/dist/services/index.js +9 -2
- package/dist/services/ingest.d.ts +12 -0
- package/dist/services/ingest.js +4 -0
- package/dist/services/link-scorers/chat-senders.js +39 -29
- package/dist/services/link-scorers/member-chats.js +4 -3
- package/dist/services/link-scorers/member-dialog.js +5 -7
- package/dist/services/link-scorers/scan.js +17 -8
- package/dist/services/link-scorers/shared.d.ts +6 -2
- package/dist/services/link-scorers/shared.js +6 -2
- package/dist/services/link-scorers/types.d.ts +2 -0
- package/dist/services/meaning-model.d.ts +7 -0
- package/dist/services/meaning-model.js +20 -0
- package/dist/services/meeting-context.d.ts +6 -1
- package/dist/services/meeting-context.js +12 -5
- package/dist/services/message-resolution.js +2 -3
- package/dist/services/messages-meaning.js +4 -5
- package/dist/services/messages-search.d.ts +5 -1
- package/dist/services/messages-search.js +1 -1
- package/dist/services/model-downloads.d.ts +1 -1
- package/dist/services/model-downloads.js +6 -4
- package/dist/services/money-context.d.ts +73 -0
- package/dist/services/money-context.js +77 -0
- package/dist/services/notes-search.d.ts +4 -1
- package/dist/services/notes-search.js +19 -7
- package/dist/services/organization-context.d.ts +80 -0
- package/dist/services/organization-context.js +154 -0
- package/dist/services/people.d.ts +22 -6
- package/dist/services/people.js +38 -8
- package/dist/services/person-business.d.ts +43 -0
- package/dist/services/person-business.js +67 -0
- package/dist/services/person-context.d.ts +9 -1
- package/dist/services/person-context.js +5 -3
- package/dist/services/proposals/kinds/identity-link.d.ts +4 -0
- package/dist/services/proposals/kinds/identity-link.js +48 -0
- package/dist/services/proposals/kinds/orders.js +1 -1
- package/dist/services/proposals/registry.js +2 -0
- package/dist/services/search-kind.d.ts +12 -5
- package/dist/services/search-kind.js +49 -10
- package/dist/services/text-model-choice.js +1 -1
- package/dist/store/accounts.d.ts +18 -0
- package/dist/store/accounts.js +18 -3
- package/dist/store/damage.d.ts +43 -10
- package/dist/store/damage.js +119 -36
- package/dist/store/decisions.js +3 -1
- package/dist/store/evidence-findings.d.ts +14 -0
- package/dist/store/evidence-findings.js +2 -0
- package/dist/store/exports.d.ts +2 -1
- package/dist/store/identity-links.d.ts +92 -0
- package/dist/store/identity-links.js +6 -0
- package/dist/store/index.d.ts +11 -5
- package/dist/store/index.js +5 -2
- package/dist/store/journal.d.ts +10 -0
- package/dist/store/journal.js +33 -0
- package/dist/store/marks.d.ts +19 -1
- package/dist/store/marks.js +23 -1
- package/dist/store/migrations.d.ts +1 -1
- package/dist/store/migrations.js +35 -12
- package/dist/store/people.d.ts +22 -0
- package/dist/store/people.js +15 -1
- package/dist/store/recover.d.ts +34 -0
- package/dist/store/recover.js +188 -6
- package/dist/store/refill.d.ts +28 -0
- package/dist/store/refill.js +120 -0
- package/dist/store/sqlite/accounts.js +2 -0
- package/dist/store/sqlite/base-stages.d.ts +122 -0
- package/dist/store/sqlite/base-stages.js +443 -0
- package/dist/store/sqlite/base-suggest.d.ts +13 -0
- package/dist/store/sqlite/base-suggest.js +62 -0
- package/dist/store/sqlite/business-contracts.js +10 -1
- package/dist/store/sqlite/clients.d.ts +7 -3
- package/dist/store/sqlite/clients.js +11 -7
- package/dist/store/sqlite/crm-settings.d.ts +12 -2
- package/dist/store/sqlite/crm-settings.js +56 -13
- package/dist/store/sqlite/crm.d.ts +13 -1
- package/dist/store/sqlite/crm.js +20 -4
- package/dist/store/sqlite/deals.d.ts +33 -0
- package/dist/store/sqlite/deals.js +42 -4
- package/dist/store/sqlite/decision-requests.js +7 -3
- package/dist/store/sqlite/email-index.js +17 -15
- package/dist/store/sqlite/evidence-findings.js +29 -5
- package/dist/store/sqlite/findings-core.js +4 -2
- package/dist/store/sqlite/identity-link-rows.d.ts +50 -0
- package/dist/store/sqlite/identity-link-rows.js +146 -0
- package/dist/store/sqlite/identity-proposals.d.ts +53 -0
- package/dist/store/sqlite/identity-proposals.js +234 -0
- package/dist/store/sqlite/knowledge.js +5 -3
- package/dist/store/sqlite/link-kinds.d.ts +1 -0
- package/dist/store/sqlite/link-kinds.js +1 -0
- package/dist/store/sqlite/link-row.d.ts +6 -0
- package/dist/store/sqlite/link-row.js +35 -0
- package/dist/store/sqlite/link-source.d.ts +10 -0
- package/dist/store/sqlite/link-source.js +16 -0
- package/dist/store/sqlite/manifest.js +1 -0
- package/dist/store/sqlite/meeting-context-links.js +9 -6
- package/dist/store/sqlite/memories.js +9 -7
- package/dist/store/sqlite/mentions.d.ts +4 -1
- package/dist/store/sqlite/mentions.js +14 -9
- package/dist/store/sqlite/migrations.generated.js +8 -0
- package/dist/store/sqlite/note-index.js +9 -7
- package/dist/store/sqlite/notes.d.ts +2 -3
- package/dist/store/sqlite/notes.js +6 -29
- package/dist/store/sqlite/open-store.js +3 -0
- package/dist/store/sqlite/open.js +11 -2
- package/dist/store/sqlite/orders.d.ts +2 -0
- package/dist/store/sqlite/orders.js +9 -3
- package/dist/store/sqlite/organization-categories.d.ts +18 -0
- package/dist/store/sqlite/organization-categories.js +34 -0
- package/dist/store/sqlite/organizations.d.ts +5 -1
- package/dist/store/sqlite/organizations.js +14 -4
- package/dist/store/sqlite/person-links.d.ts +19 -4
- package/dist/store/sqlite/person-links.js +49 -11
- package/dist/store/sqlite/person-match-scan.d.ts +13 -0
- package/dist/store/sqlite/person-match-scan.js +251 -0
- package/dist/store/sqlite/person-matcher.d.ts +16 -0
- package/dist/store/sqlite/person-matcher.js +32 -0
- package/dist/store/sqlite/proposed-actions.js +6 -0
- package/dist/store/sqlite/record-matching.d.ts +2 -8
- package/dist/store/sqlite/record-matching.js +8 -40
- package/dist/store/sqlite/record-projectors-phone.js +2 -1
- package/dist/store/sqlite/record-relationships.d.ts +52 -0
- package/dist/store/sqlite/record-relationships.js +243 -0
- package/dist/store/sqlite/record-run.d.ts +5 -0
- package/dist/store/sqlite/record-run.js +62 -2
- package/dist/store/sqlite/record-writes.d.ts +1 -1
- package/dist/store/sqlite/record-writes.js +4 -2
- package/dist/store/sqlite/records.js +27 -2
- package/dist/store/sqlite/ref-accounts.d.ts +13 -0
- package/dist/store/sqlite/ref-accounts.js +117 -0
- package/dist/store/sqlite/ref-summaries.js +5 -1
- package/dist/store/sqlite/relation-list.d.ts +4 -1
- package/dist/store/sqlite/relation-list.js +20 -2
- package/dist/store/sqlite/relation-proposals.d.ts +18 -1
- package/dist/store/sqlite/relation-proposals.js +53 -11
- package/dist/store/sqlite/relation-roles.js +12 -6
- package/dist/store/sqlite/reported-relations.d.ts +11 -1
- package/dist/store/sqlite/reported-relations.js +59 -18
- package/dist/store/sqlite/schema.d.ts +32 -0
- package/dist/store/sqlite/schema.js +3 -0
- package/dist/store/sqlite/transaction.d.ts +13 -0
- package/dist/store/sqlite/transaction.js +33 -15
- package/dist/store/store.d.ts +3 -0
- package/dist/store/store.js +5 -0
- package/dist/store/write-events.d.ts +18 -0
- package/dist/store/write-events.js +88 -0
- package/package.json +3 -3
- package/parity.json +11 -4
- package/schemas/records-envelope.v1.schema.json +3 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { CATEGORIES } from "../domain/categories.js";
|
|
3
|
+
import { DEAL_KINDS, DEAL_STATUSES } from "../domain/deals.js";
|
|
4
|
+
import { FINANCE_REVIEWS, INVOICE_DIRECTIONS, INVOICE_STATUSES, MONEY_DIRECTIONS } from "../domain/finance.js";
|
|
5
|
+
import { ORDER_STATUSES } from "../domain/orders.js";
|
|
6
|
+
import { RELATION_KINDS, STANDINGS } from "../domain/relations.js";
|
|
7
|
+
import { TASK_STATES } from "../tasks/index.js";
|
|
8
|
+
import { linkedPerson } from "./contact-activity.js";
|
|
9
|
+
import { crossAccountContext } from "./contact-context.js";
|
|
10
|
+
import { deal } from "./deal.js";
|
|
11
|
+
import { count, reference, text, time } from "./fields.js";
|
|
12
|
+
import { organization } from "./knowledge-lists.js";
|
|
13
|
+
const nullableText = v.nullable(text);
|
|
14
|
+
const day = v.nullable(v.pipe(v.string(), v.regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
15
|
+
const standing = v.picklist(STANDINGS);
|
|
16
|
+
const categories = v.array(v.picklist(CATEGORIES));
|
|
17
|
+
/** A bounded list: the first items, how many there are, and the memo command that lists the rest. */
|
|
18
|
+
const section = (item) => v.strictObject({ items: v.array(item), total: count, has_more: v.boolean(), next: nullableText });
|
|
19
|
+
/** One relationship from the entity asked about: a `link:` ref, its role and its standing. */
|
|
20
|
+
const relationRole = v.strictObject({
|
|
21
|
+
/** `link:<id>`; absent for a proposal. */
|
|
22
|
+
link: v.optional(reference),
|
|
23
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
24
|
+
proposal: v.optional(text),
|
|
25
|
+
kind: v.picklist(RELATION_KINDS),
|
|
26
|
+
role: nullableText,
|
|
27
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
28
|
+
standing,
|
|
29
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
30
|
+
account: v.optional(text),
|
|
31
|
+
/** A job title the source gave; never a role. */
|
|
32
|
+
position: v.optional(text),
|
|
33
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
34
|
+
derived: v.optional(text),
|
|
35
|
+
starts_at: v.optional(time),
|
|
36
|
+
ends_at: v.optional(time),
|
|
37
|
+
});
|
|
38
|
+
/** Another entity, once, with every relationship joining it to the one asked about. */
|
|
39
|
+
const related = v.strictObject({ ref: reference, name: nullableText, roles: v.array(relationRole) });
|
|
40
|
+
const coverage = v.strictObject({
|
|
41
|
+
/** `<provider>:<account>` of every account read. */
|
|
42
|
+
accounts: v.array(text),
|
|
43
|
+
not_read: v.array(v.strictObject({ source: text, reason: text })),
|
|
44
|
+
});
|
|
45
|
+
const linkedBy = v.array(v.picklist(["project", "counterparty"]));
|
|
46
|
+
const financeTotal = v.strictObject({
|
|
47
|
+
status: text,
|
|
48
|
+
currency: text,
|
|
49
|
+
rows: count,
|
|
50
|
+
total: text,
|
|
51
|
+
open: v.optional(text),
|
|
52
|
+
});
|
|
53
|
+
const money = v.strictObject({
|
|
54
|
+
invoices: section(v.strictObject({
|
|
55
|
+
ref: reference,
|
|
56
|
+
title: text,
|
|
57
|
+
direction: v.picklist(INVOICE_DIRECTIONS),
|
|
58
|
+
status: v.picklist(INVOICE_STATUSES),
|
|
59
|
+
review: v.picklist(FINANCE_REVIEWS),
|
|
60
|
+
currency: text,
|
|
61
|
+
total: text,
|
|
62
|
+
open: text,
|
|
63
|
+
due_date: day,
|
|
64
|
+
linked_by: linkedBy,
|
|
65
|
+
})),
|
|
66
|
+
payments: section(v.strictObject({
|
|
67
|
+
ref: reference,
|
|
68
|
+
title: text,
|
|
69
|
+
direction: v.picklist(MONEY_DIRECTIONS),
|
|
70
|
+
review: v.picklist(FINANCE_REVIEWS),
|
|
71
|
+
currency: text,
|
|
72
|
+
amount: text,
|
|
73
|
+
date: day,
|
|
74
|
+
linked_by: linkedBy,
|
|
75
|
+
})),
|
|
76
|
+
orders: v.optional(section(v.strictObject({
|
|
77
|
+
ref: reference,
|
|
78
|
+
title: text,
|
|
79
|
+
status: v.picklist(ORDER_STATUSES),
|
|
80
|
+
review: v.picklist(FINANCE_REVIEWS),
|
|
81
|
+
currency: nullableText,
|
|
82
|
+
total: nullableText,
|
|
83
|
+
side: v.picklist(["customer", "supplier"]),
|
|
84
|
+
}))),
|
|
85
|
+
/** Confirmed rows only, per status (payments: direction) and currency; nothing converted. */
|
|
86
|
+
totals: v.strictObject({ invoices: v.array(financeTotal), payments: v.array(financeTotal) }),
|
|
87
|
+
/** Invoices and payments still proposed, of every row read. */
|
|
88
|
+
unconfirmed: count,
|
|
89
|
+
/** `false` when a read stopped at the store's page: the totals may leave rows out. */
|
|
90
|
+
complete: v.boolean(),
|
|
91
|
+
});
|
|
92
|
+
const taskLine = v.strictObject({
|
|
93
|
+
ref: reference,
|
|
94
|
+
key: text,
|
|
95
|
+
title: text,
|
|
96
|
+
status: v.picklist(TASK_STATES),
|
|
97
|
+
project: reference,
|
|
98
|
+
due_at: v.nullable(time),
|
|
99
|
+
});
|
|
100
|
+
const counts = { messages: count, mail: count, meetings: count };
|
|
101
|
+
/** What a person is in the owner's business: organizations, reporting lines, deals and projects, with standing. */
|
|
102
|
+
export const personBusiness = v.strictObject({
|
|
103
|
+
organizations: section(v.strictObject({ ...related.entries, categories })),
|
|
104
|
+
reports_to: section(related),
|
|
105
|
+
direct_reports: section(related),
|
|
106
|
+
deals: section(related),
|
|
107
|
+
projects: section(related),
|
|
108
|
+
categories,
|
|
109
|
+
});
|
|
110
|
+
/** Any canonical person's context: every account in scope read, their business, and what was not read. */
|
|
111
|
+
export const personContext = v.strictObject({
|
|
112
|
+
...crossAccountContext.entries,
|
|
113
|
+
person: linkedPerson,
|
|
114
|
+
has_more: v.boolean(),
|
|
115
|
+
business: personBusiness,
|
|
116
|
+
coverage,
|
|
117
|
+
});
|
|
118
|
+
/** One organization: people, customers, suppliers, partners, projects, open deals, money and how much is said. */
|
|
119
|
+
export const organizationContext = v.strictObject({
|
|
120
|
+
organization: v.strictObject({ ...organization.entries, own: v.boolean() }),
|
|
121
|
+
categories,
|
|
122
|
+
people: section(related),
|
|
123
|
+
customers: section(related),
|
|
124
|
+
/** Whom it is a customer of: "supplier of", read backwards. */
|
|
125
|
+
suppliers: section(related),
|
|
126
|
+
partners: section(related),
|
|
127
|
+
projects: section(v.strictObject({ ref: reference, name: text, via: v.array(v.picklist(["organization", "deal"])) })),
|
|
128
|
+
deals: section(v.strictObject({
|
|
129
|
+
ref: reference,
|
|
130
|
+
kind: v.picklist(DEAL_KINDS),
|
|
131
|
+
title: text,
|
|
132
|
+
summary: text,
|
|
133
|
+
stage: text,
|
|
134
|
+
status: v.picklist(DEAL_STATUSES),
|
|
135
|
+
currency: nullableText,
|
|
136
|
+
amount: nullableText,
|
|
137
|
+
close_date: day,
|
|
138
|
+
project: v.nullable(reference),
|
|
139
|
+
})),
|
|
140
|
+
money,
|
|
141
|
+
/** Counts only, through its own people, in the accounts read. */
|
|
142
|
+
communications: v.strictObject({ ...counts, has_more: v.boolean() }),
|
|
143
|
+
tasks: section(taskLine),
|
|
144
|
+
coverage,
|
|
145
|
+
});
|
|
146
|
+
const { untrusted: _, ...dealRow } = deal.entries;
|
|
147
|
+
/** One deal or lead: the row, its stages, client, people, project, money and what its people said in its time. */
|
|
148
|
+
export const dealContext = v.strictObject({
|
|
149
|
+
deal: v.strictObject(dealRow),
|
|
150
|
+
stages: section(v.strictObject({ from: nullableText, to: text, pipeline: reference, at: time })),
|
|
151
|
+
organization: v.nullable(v.strictObject({ ref: reference, name: nullableText, categories })),
|
|
152
|
+
participants: section(related),
|
|
153
|
+
owner: v.nullable(related),
|
|
154
|
+
project: v.nullable(v.strictObject({ ref: reference, name: nullableText })),
|
|
155
|
+
money,
|
|
156
|
+
window: v.strictObject({ since: time, until: time }),
|
|
157
|
+
/** Shared people within its lifetime: `proposed`, an overlap of people, never a link. */
|
|
158
|
+
communications: v.strictObject({
|
|
159
|
+
...section(v.strictObject({
|
|
160
|
+
kind: v.picklist(["message", "mail", "meeting"]),
|
|
161
|
+
ref: reference,
|
|
162
|
+
title: nullableText,
|
|
163
|
+
at: v.nullable(time),
|
|
164
|
+
people: v.array(reference),
|
|
165
|
+
standing: v.literal("proposed"),
|
|
166
|
+
})).entries,
|
|
167
|
+
counts: v.strictObject(counts),
|
|
168
|
+
}),
|
|
169
|
+
tasks: section(taskLine),
|
|
170
|
+
coverage,
|
|
171
|
+
});
|
|
172
|
+
/** A deal context's compact form, for a model's context. */
|
|
173
|
+
export const dealBrief = v.strictObject({
|
|
174
|
+
ref: reference,
|
|
175
|
+
kind: v.picklist(DEAL_KINDS),
|
|
176
|
+
title: text,
|
|
177
|
+
pipeline: text,
|
|
178
|
+
stage: text,
|
|
179
|
+
status: v.picklist(DEAL_STATUSES),
|
|
180
|
+
amount: nullableText,
|
|
181
|
+
currency: nullableText,
|
|
182
|
+
close_date: day,
|
|
183
|
+
organization: nullableText,
|
|
184
|
+
owner: nullableText,
|
|
185
|
+
people: v.array(v.strictObject({ ref: reference, name: nullableText, roles: v.array(text), standing })),
|
|
186
|
+
project: nullableText,
|
|
187
|
+
stages: v.array(text),
|
|
188
|
+
money: v.strictObject({ ...money.entries.totals.entries, unconfirmed: count, complete: v.boolean() }),
|
|
189
|
+
communications: v.strictObject({ ...counts, standing: v.literal("proposed") }),
|
|
190
|
+
open_tasks: count,
|
|
191
|
+
not_read: coverage.entries.not_read,
|
|
192
|
+
});
|
|
@@ -17,6 +17,8 @@ export declare const linkedPerson: v.StrictObjectSchema<{
|
|
|
17
17
|
readonly linked_by: v.StringSchema<undefined>;
|
|
18
18
|
readonly linked_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`">]>;
|
|
19
19
|
}, undefined>, undefined>;
|
|
20
|
+
/** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
|
|
21
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
20
22
|
}, undefined>;
|
|
21
23
|
export declare const contactActivity: v.StrictObjectSchema<{
|
|
22
24
|
readonly 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`">]>;
|
|
@@ -13,7 +13,13 @@ const linkedIdentity = v.strictObject({
|
|
|
13
13
|
linked_by: text,
|
|
14
14
|
linked_at: time,
|
|
15
15
|
});
|
|
16
|
-
export const linkedPerson = v.strictObject({
|
|
16
|
+
export const linkedPerson = v.strictObject({
|
|
17
|
+
uid: id,
|
|
18
|
+
name: v.nullable(text),
|
|
19
|
+
identities: v.array(linkedIdentity),
|
|
20
|
+
/** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
|
|
21
|
+
proposal: v.optional(text),
|
|
22
|
+
});
|
|
17
23
|
export const contactActivity = v.strictObject({
|
|
18
24
|
at: time,
|
|
19
25
|
subject: text,
|
|
@@ -21,6 +21,159 @@ export declare const contextEvent: v.StrictObjectSchema<{
|
|
|
21
21
|
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
22
22
|
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
23
23
|
}, undefined>;
|
|
24
|
+
declare const context: v.StrictObjectSchema<{
|
|
25
|
+
readonly person: v.StrictObjectSchema<{
|
|
26
|
+
readonly uid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
27
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
28
|
+
readonly identities: v.ArraySchema<v.StrictObjectSchema<{
|
|
29
|
+
readonly provider: v.StringSchema<undefined>;
|
|
30
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
31
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
32
|
+
readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
33
|
+
readonly is_bot: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
34
|
+
readonly accounts: v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
35
|
+
readonly seen_in: v.ArraySchema<v.StrictObjectSchema<{
|
|
36
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
37
|
+
readonly scope: v.PicklistSchema<["personal", "work"], undefined>;
|
|
38
|
+
}, undefined>, undefined>;
|
|
39
|
+
readonly method: v.StringSchema<undefined>;
|
|
40
|
+
readonly linked_by: v.StringSchema<undefined>;
|
|
41
|
+
readonly linked_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`">]>;
|
|
42
|
+
}, undefined>, undefined>;
|
|
43
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
44
|
+
readonly provider: v.StringSchema<undefined>;
|
|
45
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
/** The accounts read: only those of the scopes the caller may read. */
|
|
48
|
+
readonly accounts: v.ArraySchema<v.StrictObjectSchema<{
|
|
49
|
+
readonly provider: v.StringSchema<undefined>;
|
|
50
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
51
|
+
readonly scope: v.PicklistSchema<["personal", "work"], undefined>;
|
|
52
|
+
}, undefined>, undefined>;
|
|
53
|
+
readonly shared: v.ArraySchema<v.StrictObjectSchema<{
|
|
54
|
+
readonly provider: v.StringSchema<undefined>;
|
|
55
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
56
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
57
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
58
|
+
readonly kind: v.PicklistSchema<["dialog", "group", "channel", "saved", "unknown"], undefined>;
|
|
59
|
+
readonly last_message_at: v.NullableSchema<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`">]>, undefined>;
|
|
60
|
+
}, undefined>, undefined>;
|
|
61
|
+
readonly last: v.StrictObjectSchema<{
|
|
62
|
+
readonly from_them: v.NullableSchema<v.StrictObjectSchema<{
|
|
63
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
64
|
+
readonly provider: v.StringSchema<undefined>;
|
|
65
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
66
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
67
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
68
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
69
|
+
readonly timestamp: 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`">]>;
|
|
70
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
71
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
72
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
73
|
+
readonly text: v.StringSchema<undefined>;
|
|
74
|
+
}, undefined>, undefined>;
|
|
75
|
+
readonly from_me: v.NullableSchema<v.StrictObjectSchema<{
|
|
76
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
77
|
+
readonly provider: v.StringSchema<undefined>;
|
|
78
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
79
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
80
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
81
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
82
|
+
readonly timestamp: 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`">]>;
|
|
83
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
84
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
85
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
86
|
+
readonly text: v.StringSchema<undefined>;
|
|
87
|
+
}, undefined>, undefined>;
|
|
88
|
+
readonly from_them_anywhere: v.NullableSchema<v.StrictObjectSchema<{
|
|
89
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
90
|
+
readonly provider: v.StringSchema<undefined>;
|
|
91
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
92
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
93
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
94
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
95
|
+
readonly timestamp: 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`">]>;
|
|
96
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
97
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
99
|
+
readonly text: v.StringSchema<undefined>;
|
|
100
|
+
}, undefined>, undefined>;
|
|
101
|
+
}, undefined>;
|
|
102
|
+
readonly recent: v.StrictObjectSchema<{
|
|
103
|
+
readonly direct: v.ArraySchema<v.StrictObjectSchema<{
|
|
104
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
105
|
+
readonly provider: v.StringSchema<undefined>;
|
|
106
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
107
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
108
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
109
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
110
|
+
readonly timestamp: 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`">]>;
|
|
111
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
112
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
113
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
114
|
+
readonly text: v.StringSchema<undefined>;
|
|
115
|
+
}, undefined>, undefined>;
|
|
116
|
+
readonly groups: v.ArraySchema<v.StrictObjectSchema<{
|
|
117
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
118
|
+
readonly provider: v.StringSchema<undefined>;
|
|
119
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
120
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
121
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
123
|
+
readonly timestamp: 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`">]>;
|
|
124
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
125
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
126
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
127
|
+
readonly text: v.StringSchema<undefined>;
|
|
128
|
+
}, undefined>, undefined>;
|
|
129
|
+
}, undefined>;
|
|
130
|
+
readonly mentions: v.ArraySchema<v.StrictObjectSchema<{
|
|
131
|
+
readonly locator: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
132
|
+
readonly provider: v.StringSchema<undefined>;
|
|
133
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
134
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
135
|
+
readonly chat_title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
136
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
137
|
+
readonly timestamp: 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`">]>;
|
|
138
|
+
readonly sender_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
139
|
+
readonly sender_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
140
|
+
readonly outgoing: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
|
|
141
|
+
readonly text: v.StringSchema<undefined>;
|
|
142
|
+
}, undefined>, undefined>;
|
|
143
|
+
/** Calendar events they are invited to, one occurrence per series. */
|
|
144
|
+
readonly events: v.OptionalSchema<v.StrictObjectSchema<{
|
|
145
|
+
readonly upcoming: v.ArraySchema<v.StrictObjectSchema<{
|
|
146
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
147
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
148
|
+
readonly starts_at: v.NullableSchema<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`">]>, undefined>;
|
|
149
|
+
readonly ends_at: v.NullableSchema<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`">]>, undefined>;
|
|
150
|
+
readonly all_day: v.BooleanSchema<undefined>;
|
|
151
|
+
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
152
|
+
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
153
|
+
}, undefined>, undefined>;
|
|
154
|
+
readonly recent: v.ArraySchema<v.StrictObjectSchema<{
|
|
155
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
156
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
157
|
+
readonly starts_at: v.NullableSchema<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`">]>, undefined>;
|
|
158
|
+
readonly ends_at: v.NullableSchema<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`">]>, undefined>;
|
|
159
|
+
readonly all_day: v.BooleanSchema<undefined>;
|
|
160
|
+
readonly location: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
161
|
+
readonly status: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
162
|
+
}, undefined>, undefined>;
|
|
163
|
+
}, undefined>, undefined>;
|
|
164
|
+
readonly limits: v.StrictObjectSchema<{
|
|
165
|
+
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
166
|
+
readonly bytes: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
167
|
+
}, undefined>;
|
|
168
|
+
readonly complete: v.BooleanSchema<undefined>;
|
|
169
|
+
readonly not_read: v.ArraySchema<v.StrictObjectSchema<{
|
|
170
|
+
readonly provider: v.StringSchema<undefined>;
|
|
171
|
+
readonly account: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
172
|
+
readonly chat_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
173
|
+
readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
174
|
+
readonly reason: v.PicklistSchema<["not_fetched", "partial"], undefined>;
|
|
175
|
+
}, undefined>, undefined>;
|
|
176
|
+
}, undefined>;
|
|
24
177
|
export declare const contactMessages: v.StrictObjectSchema<{
|
|
25
178
|
readonly person: v.StrictObjectSchema<{
|
|
26
179
|
readonly uid: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
@@ -677,6 +830,7 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
|
|
|
677
830
|
readonly linked_by: v.StringSchema<undefined>;
|
|
678
831
|
readonly linked_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`">]>;
|
|
679
832
|
}, undefined>, undefined>;
|
|
833
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
680
834
|
readonly provider: v.StringSchema<undefined>;
|
|
681
835
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
682
836
|
}, undefined>;
|
|
@@ -1477,6 +1631,7 @@ export declare const contactPreparation: v.StrictObjectSchema<{
|
|
|
1477
1631
|
readonly linked_by: v.StringSchema<undefined>;
|
|
1478
1632
|
readonly linked_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`">]>;
|
|
1479
1633
|
}, undefined>, undefined>;
|
|
1634
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
1480
1635
|
readonly provider: v.StringSchema<undefined>;
|
|
1481
1636
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
1482
1637
|
}, undefined>;
|
|
@@ -1717,3 +1872,5 @@ export declare const contactPreparation: v.StrictObjectSchema<{
|
|
|
1717
1872
|
}, undefined>;
|
|
1718
1873
|
}, undefined>;
|
|
1719
1874
|
}, undefined>;
|
|
1875
|
+
/** The cross-account sections of a person's context, which every person context answer shares. */
|
|
1876
|
+
export { context as crossAccountContext };
|
package/dist/entities/deal.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export declare const deal: v.StrictObjectSchema<{
|
|
|
13
13
|
readonly pipeline: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
14
14
|
readonly pipeline_name: v.StringSchema<undefined>;
|
|
15
15
|
readonly stage: v.StringSchema<undefined>;
|
|
16
|
+
/** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
|
|
17
|
+
readonly base_stage: v.NullableSchema<v.StrictObjectSchema<{
|
|
18
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
19
|
+
readonly name: v.StringSchema<undefined>;
|
|
20
|
+
}, undefined>, undefined>;
|
|
16
21
|
readonly status: v.PicklistSchema<["open", "won", "lost"], undefined>;
|
|
17
22
|
readonly organization: v.NullableSchema<v.StrictObjectSchema<{
|
|
18
23
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -74,6 +79,11 @@ export declare const lead: v.StrictObjectSchema<{
|
|
|
74
79
|
readonly pipeline: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
75
80
|
readonly pipeline_name: v.StringSchema<undefined>;
|
|
76
81
|
readonly stage: v.StringSchema<undefined>;
|
|
82
|
+
/** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
|
|
83
|
+
readonly base_stage: v.NullableSchema<v.StrictObjectSchema<{
|
|
84
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
85
|
+
readonly name: v.StringSchema<undefined>;
|
|
86
|
+
}, undefined>, undefined>;
|
|
77
87
|
readonly status: v.PicklistSchema<["open", "won", "lost"], undefined>;
|
|
78
88
|
readonly organization: v.NullableSchema<v.StrictObjectSchema<{
|
|
79
89
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
package/dist/entities/deal.js
CHANGED
|
@@ -20,6 +20,8 @@ export const deal = v.strictObject({
|
|
|
20
20
|
pipeline: reference,
|
|
21
21
|
pipeline_name: text,
|
|
22
22
|
stage: text,
|
|
23
|
+
/** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
|
|
24
|
+
base_stage: v.nullable(v.strictObject({ ref: reference, name: text })),
|
|
23
25
|
status: outcome,
|
|
24
26
|
organization: v.nullable(party),
|
|
25
27
|
currency: nullableText,
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -144,6 +144,7 @@ export declare const ENTITIES: {
|
|
|
144
144
|
readonly person_uid: v.StringSchema<undefined>;
|
|
145
145
|
readonly previous_person_uid: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
146
146
|
readonly changed: v.BooleanSchema<undefined>;
|
|
147
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
147
148
|
}, undefined>], undefined>, undefined>;
|
|
148
149
|
}, undefined>;
|
|
149
150
|
readonly meeting_transcription: v.UnionSchema<[v.StrictObjectSchema<{
|
|
@@ -245,6 +246,10 @@ export declare const ENTITIES: {
|
|
|
245
246
|
readonly pipeline: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
246
247
|
readonly pipeline_name: v.StringSchema<undefined>;
|
|
247
248
|
readonly stage: v.StringSchema<undefined>;
|
|
249
|
+
readonly base_stage: v.NullableSchema<v.StrictObjectSchema<{
|
|
250
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
251
|
+
readonly name: v.StringSchema<undefined>;
|
|
252
|
+
}, undefined>, undefined>;
|
|
248
253
|
readonly status: v.PicklistSchema<["open", "won", "lost"], undefined>;
|
|
249
254
|
readonly organization: v.NullableSchema<v.StrictObjectSchema<{
|
|
250
255
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -300,6 +305,10 @@ export declare const ENTITIES: {
|
|
|
300
305
|
readonly pipeline: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
301
306
|
readonly pipeline_name: v.StringSchema<undefined>;
|
|
302
307
|
readonly stage: v.StringSchema<undefined>;
|
|
308
|
+
readonly base_stage: v.NullableSchema<v.StrictObjectSchema<{
|
|
309
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
310
|
+
readonly name: v.StringSchema<undefined>;
|
|
311
|
+
}, undefined>, undefined>;
|
|
303
312
|
readonly status: v.PicklistSchema<["open", "won", "lost"], undefined>;
|
|
304
313
|
readonly organization: v.NullableSchema<v.StrictObjectSchema<{
|
|
305
314
|
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
@@ -1346,6 +1355,7 @@ export declare const ENTITIES: {
|
|
|
1346
1355
|
readonly limited: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1347
1356
|
readonly group_too_large: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1348
1357
|
readonly older_than_window: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1358
|
+
readonly muted: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
|
|
1349
1359
|
}, undefined>, undefined>;
|
|
1350
1360
|
readonly tasks: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1351
1361
|
readonly added: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -2614,7 +2624,7 @@ export declare const ENTITIES: {
|
|
|
2614
2624
|
readonly value: v.StringSchema<undefined>;
|
|
2615
2625
|
readonly domain: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2616
2626
|
readonly confidence: v.NumberSchema<undefined>;
|
|
2617
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
2627
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
2618
2628
|
readonly field: v.StringSchema<undefined>;
|
|
2619
2629
|
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2620
2630
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -2629,7 +2639,7 @@ export declare const ENTITIES: {
|
|
|
2629
2639
|
readonly value: v.StringSchema<undefined>;
|
|
2630
2640
|
readonly domain: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2631
2641
|
readonly confidence: v.NumberSchema<undefined>;
|
|
2632
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
2642
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
2633
2643
|
readonly field: v.StringSchema<undefined>;
|
|
2634
2644
|
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2635
2645
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -2652,9 +2662,10 @@ export declare const ENTITIES: {
|
|
|
2652
2662
|
readonly mention_decision: v.StrictObjectSchema<{
|
|
2653
2663
|
readonly kind: v.PicklistSchema<["phone", "email", "url", "document", "person-name", "place"], undefined>;
|
|
2654
2664
|
readonly value: v.StringSchema<undefined>;
|
|
2655
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
2665
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
2656
2666
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
2657
2667
|
readonly mentions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
2668
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2658
2669
|
}, undefined>;
|
|
2659
2670
|
readonly mention_rebuild: v.StrictObjectSchema<{
|
|
2660
2671
|
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
@@ -2710,6 +2721,7 @@ export declare const ENTITIES: {
|
|
|
2710
2721
|
readonly linked_by: v.StringSchema<undefined>;
|
|
2711
2722
|
readonly linked_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`">]>;
|
|
2712
2723
|
}, undefined>, undefined>;
|
|
2724
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2713
2725
|
readonly provider: v.StringSchema<undefined>;
|
|
2714
2726
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
2715
2727
|
}, undefined>;
|
|
@@ -3495,6 +3507,7 @@ export declare const ENTITIES: {
|
|
|
3495
3507
|
readonly linked_by: v.StringSchema<undefined>;
|
|
3496
3508
|
readonly linked_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`">]>;
|
|
3497
3509
|
}, undefined>, undefined>;
|
|
3510
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3498
3511
|
readonly provider: v.StringSchema<undefined>;
|
|
3499
3512
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
3500
3513
|
}, undefined>;
|
|
@@ -3733,6 +3746,10 @@ export declare const ENTITIES: {
|
|
|
3733
3746
|
}, undefined>;
|
|
3734
3747
|
}, undefined>;
|
|
3735
3748
|
}, undefined>;
|
|
3749
|
+
readonly person_context: v.GenericSchema;
|
|
3750
|
+
readonly organization_context: v.GenericSchema;
|
|
3751
|
+
readonly deal_context: v.GenericSchema;
|
|
3752
|
+
readonly "deal_context.brief": v.GenericSchema;
|
|
3736
3753
|
readonly contact_activity: v.StrictObjectSchema<{
|
|
3737
3754
|
readonly 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`">]>;
|
|
3738
3755
|
readonly subject: v.StringSchema<undefined>;
|
|
@@ -3787,6 +3804,7 @@ export declare const ENTITIES: {
|
|
|
3787
3804
|
readonly linked_by: v.StringSchema<undefined>;
|
|
3788
3805
|
readonly linked_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`">]>;
|
|
3789
3806
|
}, undefined>, undefined>;
|
|
3807
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
3790
3808
|
}, undefined>;
|
|
3791
3809
|
readonly contact: v.StrictObjectSchema<{
|
|
3792
3810
|
readonly usernames: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
@@ -6666,6 +6684,8 @@ export declare const ENTITIES: {
|
|
|
6666
6684
|
readonly position: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6667
6685
|
readonly starts_at: v.NullableSchema<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`">]>, undefined>;
|
|
6668
6686
|
readonly ends_at: v.NullableSchema<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`">]>, undefined>;
|
|
6687
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6688
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
6669
6689
|
readonly created_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`">]>;
|
|
6670
6690
|
}, undefined>;
|
|
6671
6691
|
readonly recipient: v.StrictObjectSchema<{
|
package/dist/entities/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { agenda } from "./agenda.js";
|
|
|
10
10
|
import { analysisConsent, analysisConsentRevocation } from "./analysis-consent.js";
|
|
11
11
|
import { attachment, hitFile } from "./attachment.js";
|
|
12
12
|
import { attachmentBytes, attachmentExtraction, attachmentTextChange } from "./attachment-results.js";
|
|
13
|
+
import { dealBrief, dealContext, organizationContext, personContext } from "./business-context.js";
|
|
13
14
|
import { chart } from "./chart.js";
|
|
14
15
|
import { chat } from "./chat.js";
|
|
15
16
|
import { chatAdminChange, chatFolderChange, chatFolderOrder, chatFolderRemoval, chatGroupChange, chatInspection, chatInvite, chatInviteChange, chatMembersChange, chatMembersFetch, chatRead, chatRequestChange, chatSender, } from "./chat-admin.js";
|
|
@@ -171,6 +172,10 @@ export const ENTITIES = {
|
|
|
171
172
|
identity,
|
|
172
173
|
contact_context: contactContext,
|
|
173
174
|
contact_preparation: contactPreparation,
|
|
175
|
+
person_context: personContext,
|
|
176
|
+
organization_context: organizationContext,
|
|
177
|
+
deal_context: dealContext,
|
|
178
|
+
"deal_context.brief": dealBrief,
|
|
174
179
|
contact_activity: contactActivity,
|
|
175
180
|
contact_check: contactCheck,
|
|
176
181
|
linked_person: linkedPerson,
|
|
@@ -6,7 +6,7 @@ export declare const mention: v.StrictObjectSchema<{
|
|
|
6
6
|
readonly value: v.StringSchema<undefined>;
|
|
7
7
|
readonly domain: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8
8
|
readonly confidence: v.NumberSchema<undefined>;
|
|
9
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
9
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
10
10
|
readonly field: v.StringSchema<undefined>;
|
|
11
11
|
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
12
12
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -21,7 +21,7 @@ export declare const mentionDetails: v.StrictObjectSchema<{
|
|
|
21
21
|
readonly value: v.StringSchema<undefined>;
|
|
22
22
|
readonly domain: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
23
23
|
readonly confidence: v.NumberSchema<undefined>;
|
|
24
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
24
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
25
25
|
readonly field: v.StringSchema<undefined>;
|
|
26
26
|
readonly author: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
27
27
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
@@ -49,9 +49,10 @@ export declare const place: v.StrictObjectSchema<{
|
|
|
49
49
|
export declare const mentionDecision: v.StrictObjectSchema<{
|
|
50
50
|
readonly kind: v.PicklistSchema<["phone", "email", "url", "document", "person-name", "place"], undefined>;
|
|
51
51
|
readonly value: v.StringSchema<undefined>;
|
|
52
|
-
readonly status: v.PicklistSchema<["found", "linked", "dismissed"], undefined>;
|
|
52
|
+
readonly status: v.PicklistSchema<["found", "linked", "proposed", "dismissed"], undefined>;
|
|
53
53
|
readonly target: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
54
54
|
readonly mentions: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
55
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
55
56
|
}, undefined>;
|
|
56
57
|
export declare const mentionRebuild: v.StrictObjectSchema<{
|
|
57
58
|
readonly messages: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
package/dist/entities/mention.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { count, reference, text, time } from "./fields.js";
|
|
3
3
|
const kind = v.picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
4
|
-
const status = v.picklist(["found", "linked", "dismissed"]);
|
|
4
|
+
const status = v.picklist(["found", "linked", "proposed", "dismissed"]);
|
|
5
5
|
/** Mention and place IDs retain the numeric identifiers returned by the local store. */
|
|
6
6
|
export const mention = v.strictObject({
|
|
7
7
|
id: count,
|
|
@@ -33,6 +33,7 @@ export const mentionDecision = v.strictObject({
|
|
|
33
33
|
status,
|
|
34
34
|
target: v.nullable(reference),
|
|
35
35
|
mentions: count,
|
|
36
|
+
proposal: v.optional(text),
|
|
36
37
|
});
|
|
37
38
|
export const mentionRebuild = v.strictObject({
|
|
38
39
|
messages: count,
|