0.0.3 • Published 4 years ago

@cull/schema v0.0.3

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

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.