@cull/schema
v0.0.3
Published
Data models for Cull.
Downloads
2
Maintainers
Readme
schema for Cull
Data models for Cull.
Installation
npm install @cull/schema
Usage
This library is mostly useful in the typescript context to leverage the declared types.
import { Message, Organization, Sender } from '@cull/schema';
let m = new Message({...});
Models
Organization
A company, club or other organized body that sends Messages.
{
"id": "adb06a6a-7163-4435-b4c5-f903aefd213e",
"ignore": false,
"feature": false,
"domains": ["example.com"],
"url": "https://www.example.com",
"name": "Example Organization",
"description": "This is an example of an organization",
"image": "https://www.example.com/img/logo.png",
"tags": ["foo"]
}
Sender
A sub-organization, department or individual that sends Messages on behalf of an Organization.
{
"id": "adb06eee-1219-483a-a66c-cefa5723e60d",
"organization": "adb06a6a-7163-4435-b4c5-f903aefd213e",
"addresses": ["[email protected]"],
"ignore": false,
"feature": false,
"image": null,
"tags": ["bar"]
}
Message
An email message.
{
"id": "adb06d28-7cf0-4bf4-91f5-aa667bf51834",
"organizationId": "adb06a6a-7163-4435-b4c5-f903aefd213e",
"senderId": "adb06eee-1219-483a-a66c-cefa5723e60d",
"seen": false,
"flagged": false,
"image": null,
"tags": ["foo","bar","baz"],
"date": "2006-01-02T15:04:05Z07:00",
"from": ["Jaclyn <[email protected]>"],
"subject": "An example of an email",
"body": "..."
}
Development
makefile
codifies directives for building, testing, linting and other development oriented tasks.