@cull/schema
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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":    ["sender@example.com"],
  "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 <jaclyn@example.org>"],
  "subject":        "An example of an email",
  "body":           "..."
}

Development

makefile codifies directives for building, testing, linting and other development oriented tasks.

Package Sidebar

Install

npm i @cull/schema

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

26.6 kB

Total Files

32

Last publish

Collaborators

  • daetalus