@wirecat/cli-core 0.618.0 → 0.620.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 +453 -1
- package/README.md +1 -1
- package/THIRD_PARTY_NOTICES +3 -0
- package/dist/background/deliver.d.ts +5 -2
- package/dist/background/deliver.js +30 -12
- package/dist/background/report/render.d.ts +3 -1
- package/dist/background/report/render.js +3 -1
- 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/cli/search-all.d.ts +1 -1
- package/dist/calendar/cli/search-all.js +9 -10
- 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/calendar/prepare.js +1 -0
- package/dist/cli/base-stages-command.d.ts +22 -0
- package/dist/cli/base-stages-command.js +174 -0
- package/dist/cli/bot/buttons.d.ts +3 -0
- package/dist/cli/bot/buttons.js +24 -0
- package/dist/cli/bot/messages.js +14 -1
- package/dist/cli/bot/port.d.ts +8 -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.js +1 -0
- package/dist/cli/contract-templates.js +31 -2
- package/dist/cli/group-lock.d.ts +42 -0
- package/dist/cli/group-lock.js +130 -0
- package/dist/cli/index.d.ts +7 -2
- package/dist/cli/index.js +7 -2
- package/dist/cli/messenger/backfill-command.js +27 -15
- package/dist/cli/messenger/contacts-command.js +12 -4
- package/dist/cli/messenger/context.js +1 -0
- package/dist/cli/messenger/conversations-command.js +2 -1
- package/dist/cli/messenger/doctor-command.js +3 -1
- package/dist/cli/messenger/message-items.js +1 -1
- package/dist/cli/messenger/models-command.js +1 -1
- package/dist/cli/messenger/search-answers.d.ts +5 -5
- package/dist/cli/messenger/search-answers.js +9 -20
- package/dist/cli/messenger/search-command.d.ts +2 -2
- package/dist/cli/messenger/search-command.js +8 -18
- 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 +48 -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/search-harder-consents-command.d.ts +18 -0
- package/dist/cli/search-harder-consents-command.js +83 -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/steps.js +0 -6
- package/dist/cli/store-recover.d.ts +3 -3
- package/dist/cli/store-recover.js +26 -26
- package/dist/cli/store-settings.d.ts +2 -0
- package/dist/cli/store-settings.js +37 -9
- package/dist/cli/templates-command.js +4 -4
- package/dist/crm/cli/index.js +40 -8
- package/dist/crm/cli/search-all.js +7 -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/mentions.d.ts +2 -12
- package/dist/domain/mentions.js +2 -19
- package/dist/domain/models.d.ts +2 -0
- 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 +12 -2
- package/dist/domain/relations.js +14 -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 +160 -0
- package/dist/entities/contact-context.js +6 -0
- package/dist/entities/deal.d.ts +10 -0
- package/dist/entities/deal.js +2 -0
- package/dist/entities/hit.d.ts +9 -2
- package/dist/entities/hit.js +6 -2
- package/dist/entities/index.d.ts +32 -4
- 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 +39 -4
- package/dist/fetch/page.js +2 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- 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/hit-query.d.ts +1 -1
- package/dist/meetings/hit-query.js +2 -2
- package/dist/meetings/index.d.ts +1 -0
- package/dist/meetings/index.js +1 -0
- package/dist/meetings/result-items.d.ts +1 -0
- package/dist/meetings/result-items.js +1 -0
- package/dist/meetings/store.d.ts +4 -0
- package/dist/meetings/store.js +2 -1
- package/dist/models/anthropic.js +5 -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/search/question-period.d.ts +10 -0
- package/dist/search/question-period.js +133 -0
- package/dist/sends/buttons.d.ts +2 -0
- package/dist/sends/buttons.js +6 -1
- 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 +12 -2
- package/dist/services/enrichment.js +47 -6
- 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 +19 -4
- package/dist/services/index.js +12 -3
- package/dist/services/ingest.d.ts +12 -0
- package/dist/services/ingest.js +4 -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/messages.d.ts +1 -4
- package/dist/services/messages.js +0 -2
- package/dist/services/metadata.d.ts +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 +11 -1
- package/dist/services/person-context.js +25 -10
- package/dist/services/person-preparation.d.ts +5 -1
- package/dist/services/person-preparation.js +10 -3
- package/dist/services/person-timeline.d.ts +6 -1
- package/dist/services/person-timeline.js +10 -2
- 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-all-deprecated.d.ts +40 -0
- package/dist/services/search-all-deprecated.js +10 -0
- package/dist/services/search-all-meetings.d.ts +50 -52
- package/dist/services/search-all-meetings.js +265 -272
- package/dist/services/search-all.d.ts +34 -6
- package/dist/services/search-all.js +118 -24
- package/dist/services/search-harder.d.ts +64 -0
- package/dist/services/search-harder.js +194 -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/chats.d.ts +3 -1
- package/dist/store/chats.js +6 -0
- 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/people.d.ts +28 -2
- package/dist/store/people.js +15 -1
- package/dist/store/sqlite/accounts.js +2 -0
- package/dist/store/sqlite/added-sources.d.ts +15 -3
- package/dist/store/sqlite/added-sources.js +26 -5
- 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/chats.d.ts +2 -0
- package/dist/store/sqlite/chats.js +6 -0
- 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 +8 -4
- 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/involvements.d.ts +1 -1
- package/dist/store/sqlite/involvements.js +4 -2
- package/dist/store/sqlite/knowledge.js +2 -2
- 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/meeting-hit-query.d.ts +5 -0
- package/dist/store/sqlite/meeting-hit-query.js +33 -0
- package/dist/store/sqlite/meeting-hit-search.js +10 -8
- package/dist/store/sqlite/meetings.js +1 -1
- 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/notes.d.ts +8 -2
- package/dist/store/sqlite/notes.js +17 -34
- 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/person-preparation.d.ts +7 -3
- package/dist/store/sqlite/person-preparation.js +20 -6
- 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 +22 -4
- package/dist/store/sqlite/relation-proposals.d.ts +6 -0
- package/dist/store/sqlite/relation-proposals.js +3 -0
- 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.js +11 -1
- 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 +37 -16
- package/schemas/records-envelope.v1.schema.json +3 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
/** What a person is in the owner's business: organizations, reporting lines, deals and projects, with standing. */
|
|
3
|
+
export declare const personBusiness: v.StrictObjectSchema<{
|
|
4
|
+
readonly organizations: v.StrictObjectSchema<{
|
|
5
|
+
readonly items: v.ArraySchema<v.StrictObjectSchema<{
|
|
6
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
7
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8
|
+
readonly roles: v.ArraySchema<v.StrictObjectSchema<{
|
|
9
|
+
/** `link:<id>`; absent for a proposal. */
|
|
10
|
+
readonly link: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
11
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
12
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
13
|
+
readonly kind: v.PicklistSchema<("customer-of" | "member-of" | "partner-of" | "related-to" | "reports-to")[], undefined>;
|
|
14
|
+
readonly role: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
15
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
16
|
+
readonly standing: v.PicklistSchema<readonly ["confirmed", "reported", "proposed", "ended"], undefined>;
|
|
17
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
18
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
19
|
+
/** A job title the source gave; never a role. */
|
|
20
|
+
readonly position: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
21
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
22
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
23
|
+
readonly starts_at: v.OptionalSchema<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>;
|
|
24
|
+
readonly ends_at: v.OptionalSchema<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>;
|
|
25
|
+
}, undefined>, undefined>;
|
|
26
|
+
readonly categories: v.ArraySchema<v.PicklistSchema<readonly ["client", "supplier", "partner", "employer"], undefined>, undefined>;
|
|
27
|
+
}, undefined>, undefined>;
|
|
28
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
29
|
+
readonly has_more: v.BooleanSchema<undefined>;
|
|
30
|
+
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
31
|
+
}, undefined>;
|
|
32
|
+
readonly reports_to: v.StrictObjectSchema<{
|
|
33
|
+
readonly items: v.ArraySchema<v.StrictObjectSchema<{
|
|
34
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
35
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
36
|
+
readonly roles: v.ArraySchema<v.StrictObjectSchema<{
|
|
37
|
+
/** `link:<id>`; absent for a proposal. */
|
|
38
|
+
readonly link: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
39
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
40
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
41
|
+
readonly kind: v.PicklistSchema<("customer-of" | "member-of" | "partner-of" | "related-to" | "reports-to")[], undefined>;
|
|
42
|
+
readonly role: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
43
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
44
|
+
readonly standing: v.PicklistSchema<readonly ["confirmed", "reported", "proposed", "ended"], undefined>;
|
|
45
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
46
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
47
|
+
/** A job title the source gave; never a role. */
|
|
48
|
+
readonly position: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
49
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
50
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
51
|
+
readonly starts_at: v.OptionalSchema<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>;
|
|
52
|
+
readonly ends_at: v.OptionalSchema<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>;
|
|
53
|
+
}, undefined>, undefined>;
|
|
54
|
+
}, undefined>, undefined>;
|
|
55
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
56
|
+
readonly has_more: v.BooleanSchema<undefined>;
|
|
57
|
+
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
58
|
+
}, undefined>;
|
|
59
|
+
readonly direct_reports: v.StrictObjectSchema<{
|
|
60
|
+
readonly items: v.ArraySchema<v.StrictObjectSchema<{
|
|
61
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
62
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
63
|
+
readonly roles: v.ArraySchema<v.StrictObjectSchema<{
|
|
64
|
+
/** `link:<id>`; absent for a proposal. */
|
|
65
|
+
readonly link: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
66
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
67
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
68
|
+
readonly kind: v.PicklistSchema<("customer-of" | "member-of" | "partner-of" | "related-to" | "reports-to")[], undefined>;
|
|
69
|
+
readonly role: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
70
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
71
|
+
readonly standing: v.PicklistSchema<readonly ["confirmed", "reported", "proposed", "ended"], undefined>;
|
|
72
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
73
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
74
|
+
/** A job title the source gave; never a role. */
|
|
75
|
+
readonly position: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
76
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
77
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
78
|
+
readonly starts_at: v.OptionalSchema<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>;
|
|
79
|
+
readonly ends_at: v.OptionalSchema<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>;
|
|
80
|
+
}, undefined>, undefined>;
|
|
81
|
+
}, undefined>, undefined>;
|
|
82
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
83
|
+
readonly has_more: v.BooleanSchema<undefined>;
|
|
84
|
+
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
85
|
+
}, undefined>;
|
|
86
|
+
readonly deals: v.StrictObjectSchema<{
|
|
87
|
+
readonly items: v.ArraySchema<v.StrictObjectSchema<{
|
|
88
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
89
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
90
|
+
readonly roles: v.ArraySchema<v.StrictObjectSchema<{
|
|
91
|
+
/** `link:<id>`; absent for a proposal. */
|
|
92
|
+
readonly link: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
93
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
94
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
95
|
+
readonly kind: v.PicklistSchema<("customer-of" | "member-of" | "partner-of" | "related-to" | "reports-to")[], undefined>;
|
|
96
|
+
readonly role: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
97
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
98
|
+
readonly standing: v.PicklistSchema<readonly ["confirmed", "reported", "proposed", "ended"], undefined>;
|
|
99
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
100
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
101
|
+
/** A job title the source gave; never a role. */
|
|
102
|
+
readonly position: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
103
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
104
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
105
|
+
readonly starts_at: v.OptionalSchema<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>;
|
|
106
|
+
readonly ends_at: v.OptionalSchema<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>;
|
|
107
|
+
}, undefined>, undefined>;
|
|
108
|
+
}, undefined>, undefined>;
|
|
109
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
110
|
+
readonly has_more: v.BooleanSchema<undefined>;
|
|
111
|
+
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
112
|
+
}, undefined>;
|
|
113
|
+
readonly projects: v.StrictObjectSchema<{
|
|
114
|
+
readonly items: v.ArraySchema<v.StrictObjectSchema<{
|
|
115
|
+
readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
|
|
116
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
117
|
+
readonly roles: v.ArraySchema<v.StrictObjectSchema<{
|
|
118
|
+
/** `link:<id>`; absent for a proposal. */
|
|
119
|
+
readonly link: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>, undefined>;
|
|
120
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
121
|
+
readonly proposal: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
+
readonly kind: v.PicklistSchema<("customer-of" | "member-of" | "partner-of" | "related-to" | "reports-to")[], undefined>;
|
|
123
|
+
readonly role: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
124
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
125
|
+
readonly standing: v.PicklistSchema<readonly ["confirmed", "reported", "proposed", "ended"], undefined>;
|
|
126
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
127
|
+
readonly account: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
128
|
+
/** A job title the source gave; never a role. */
|
|
129
|
+
readonly position: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
130
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
131
|
+
readonly derived: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
132
|
+
readonly starts_at: v.OptionalSchema<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>;
|
|
133
|
+
readonly ends_at: v.OptionalSchema<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>;
|
|
134
|
+
}, undefined>, undefined>;
|
|
135
|
+
}, undefined>, undefined>;
|
|
136
|
+
readonly total: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
137
|
+
readonly has_more: v.BooleanSchema<undefined>;
|
|
138
|
+
readonly next: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
139
|
+
}, undefined>;
|
|
140
|
+
readonly categories: v.ArraySchema<v.PicklistSchema<readonly ["client", "supplier", "partner", "employer"], undefined>, undefined>;
|
|
141
|
+
}, undefined>;
|
|
142
|
+
/** Any canonical person's context: every account in scope read, their business, and what was not read. */
|
|
143
|
+
export declare const personContext: v.GenericSchema;
|
|
144
|
+
/** One organization: people, customers, suppliers, partners, projects, open deals, money and how much is said. */
|
|
145
|
+
export declare const organizationContext: v.GenericSchema;
|
|
146
|
+
/** One deal or lead: the row, its stages, client, people, project, money and what its people said in its time. */
|
|
147
|
+
export declare const dealContext: v.GenericSchema;
|
|
148
|
+
/** A deal context's compact form, for a model's context. */
|
|
149
|
+
export declare const dealBrief: v.GenericSchema;
|
|
@@ -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>;
|
|
@@ -1692,18 +1847,21 @@ export declare const contactPreparation: v.StrictObjectSchema<{
|
|
|
1692
1847
|
readonly cut_by: v.NullableSchema<v.PicklistSchema<["limit", "bytes"], undefined>, undefined>;
|
|
1693
1848
|
readonly selection: v.LiteralSchema<"open, assigned to them in any role", undefined>;
|
|
1694
1849
|
readonly accounts: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
1850
|
+
readonly scopes: v.ArraySchema<v.PicklistSchema<["personal", "work"], undefined>, undefined>;
|
|
1695
1851
|
}, undefined>;
|
|
1696
1852
|
readonly facts: v.StrictObjectSchema<{
|
|
1697
1853
|
readonly included: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1698
1854
|
readonly has_more: v.BooleanSchema<undefined>;
|
|
1699
1855
|
readonly cut_by: v.NullableSchema<v.PicklistSchema<["limit", "bytes"], undefined>, undefined>;
|
|
1700
1856
|
readonly selection: v.LiteralSchema<"accepted, about them or a project they are a member of", undefined>;
|
|
1857
|
+
readonly scopes: v.ArraySchema<v.PicklistSchema<["personal", "work"], undefined>, undefined>;
|
|
1701
1858
|
}, undefined>;
|
|
1702
1859
|
readonly notes: v.StrictObjectSchema<{
|
|
1703
1860
|
readonly included: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1704
1861
|
readonly has_more: v.BooleanSchema<undefined>;
|
|
1705
1862
|
readonly cut_by: v.NullableSchema<v.PicklistSchema<["limit", "bytes"], undefined>, undefined>;
|
|
1706
1863
|
readonly selection: v.LiteralSchema<"written by you, about them", undefined>;
|
|
1864
|
+
readonly scopes: v.ArraySchema<v.PicklistSchema<["personal", "work"], undefined>, undefined>;
|
|
1707
1865
|
readonly withheld: v.OptionalSchema<v.LiteralSchema<"contacts.notes.list", undefined>, undefined>;
|
|
1708
1866
|
}, undefined>;
|
|
1709
1867
|
readonly meetings: v.StrictObjectSchema<{
|
|
@@ -1717,3 +1875,5 @@ export declare const contactPreparation: v.StrictObjectSchema<{
|
|
|
1717
1875
|
}, undefined>;
|
|
1718
1876
|
}, undefined>;
|
|
1719
1877
|
}, undefined>;
|
|
1878
|
+
/** The cross-account sections of a person's context, which every person context answer shares. */
|
|
1879
|
+
export { context as crossAccountContext };
|
|
@@ -139,6 +139,7 @@ export const meetingCue = v.strictObject({
|
|
|
139
139
|
text,
|
|
140
140
|
revision: v.picklist(["current", "superseded"]),
|
|
141
141
|
});
|
|
142
|
+
const scopes = v.array(v.picklist(["personal", "work"]));
|
|
142
143
|
export const contactPreparation = v.strictObject({
|
|
143
144
|
...context.entries,
|
|
144
145
|
prepare: v.strictObject({
|
|
@@ -183,14 +184,17 @@ export const contactPreparation = v.strictObject({
|
|
|
183
184
|
...coverage.entries,
|
|
184
185
|
selection: v.literal("open, assigned to them in any role"),
|
|
185
186
|
accounts: v.array(text),
|
|
187
|
+
scopes,
|
|
186
188
|
}),
|
|
187
189
|
facts: v.strictObject({
|
|
188
190
|
...coverage.entries,
|
|
189
191
|
selection: v.literal("accepted, about them or a project they are a member of"),
|
|
192
|
+
scopes,
|
|
190
193
|
}),
|
|
191
194
|
notes: v.strictObject({
|
|
192
195
|
...coverage.entries,
|
|
193
196
|
selection: v.literal("written by you, about them"),
|
|
197
|
+
scopes,
|
|
194
198
|
withheld: v.optional(v.literal("contacts.notes.list")),
|
|
195
199
|
}),
|
|
196
200
|
meetings: v.strictObject({
|
|
@@ -202,3 +206,5 @@ export const contactPreparation = v.strictObject({
|
|
|
202
206
|
}),
|
|
203
207
|
}),
|
|
204
208
|
});
|
|
209
|
+
/** The cross-account sections of a person's context, which every person context answer shares. */
|
|
210
|
+
export { context as crossAccountContext };
|