Skip to content

contacts

Contacts: people outside the org who talk to its agents, such as a WhatsApp customer writing to a business's number.

On this page 6
TypeScript
import { contacts } from "copilotz/plugins/access";

What it keeps

It keeps 1 collection, on the record: every change to it is an event.

CollectionKept asFields
contactdocumentsin, via, name, at

The access rules cover contact: each document is in a space, and only those who reach the space reach it.

Its named queries read for callers, as the rules let them:

QueryWho outside runs it
contact.namespeople, agents for a person, keys and routines

What it lets callers do

Of its 3 Actions, people may call 1; agents, contacts and someone signed out may call none.

ActionPersonAgentContactAnyoneKeyRoutineWhat it does
contact.forgetyesnononononoErases a contact: its access, its record, and with chats, its chats.

An agent works for a person, and calls what both may. A key calls only what its scope names. A routine is work done for a person, which they set going.

Only the app's own code calls contact.chat and contact.start: its plugins, its schedules and the system.

It also adds rules every read and write keeps to (guard).

Where it shows

Its Views show to the model.

  • To the model: context:contact.
  • Front ends: contacts-web.
  • What it adds to resources: context (contact), names (contact).

What it needs

Nothing to set: it works as it comes.

What it requires

The runtime doesn't start without spaces: add it too.

It ships with copilotz@1.0.0-rc.34.

Listing

It keeps every listing rule.